473,480 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MANY problems with subform in tab; want to add new record (adp/SQL)!?!?!

running access 2k; adp w/ linked tables to SQL server;

I am absolutely stymied, and ticked off beyond belief - I can not
believe how much time I've wasted trying to do something that should be
comically easy!!!!!

I have 2 tables: T_people, T_calls in a 1 to many relation (many
calls to each person).

I have a form with tabs in it. the form is NOT attached to a record
source. The first tab is filled with UNBOUND fields relating to
T_people. The fields are unbound with no recordsource, because I don't
want users to "browse" the records. They must enter an exact ID#, to
pull up a record. THIS WORKS JUST FINE (obviously, I have code that
does the lookup).

The 2nd tab contains a sub-form which should show only calls related to
the selected person in tab 1.

This sub-form has T_calls as its record source, and filtered by
person_id.
If I open this sub-form ALONE, I have no problem adding records. the >*
nav button is available, and works. As soon as I open the main form
with tabs, and goto this sub-form, the >* nav button is greyed out. I
added a button to this subform "add new call", with code that does a
"DoCmd.GoToRecord".

This button/code fails miserably, and I have tried EVERYTHING I can
think of and MANY permutations on stuff I've read about in this group,
with no success what-so-ever.

I can't just do a simple DoCmd.GoToRecord, because the "object isn't
open".
I can't setfocus on the dam object, because I can't seem to find it in
ANY collection!?!?!?

Forms("MainForm!SubForm").SetFocus (and all the syntactical
variations) DOES NOT work; apparently because I need to address the
tab. I can't figure out how to setfocus to the sub-form under the tab
in order to do a GoToRecord.

AND - I'm not even sure that once I do this, if the ----'g GoToRecord
will even work!!!!!!

Why the blazes is something that seems so easy, so freaking hard????
any help appreciated...
TIA

Jun 15 '06 #1
4 3899
bo*************@gmail.com wrote:
running access 2k; adp w/ linked tables to SQL server;

I am absolutely stymied, and ticked off beyond belief - I can not
believe how much time I've wasted trying to do something that should be
comically easy!!!!!

I have 2 tables: T_people, T_calls in a 1 to many relation (many
calls to each person).

I have a form with tabs in it. the form is NOT attached to a record
source. The first tab is filled with UNBOUND fields relating to
T_people. The fields are unbound with no recordsource, because I don't
want users to "browse" the records. They must enter an exact ID#, to
pull up a record. THIS WORKS JUST FINE (obviously, I have code that
does the lookup).

The 2nd tab contains a sub-form which should show only calls related to
the selected person in tab 1.

This sub-form has T_calls as its record source, and filtered by
person_id.
If I open this sub-form ALONE, I have no problem adding records. the >*
nav button is available, and works. As soon as I open the main form
with tabs, and goto this sub-form, the >* nav button is greyed out. I
added a button to this subform "add new call", with code that does a
"DoCmd.GoToRecord".

This button/code fails miserably, and I have tried EVERYTHING I can
think of and MANY permutations on stuff I've read about in this group,
with no success what-so-ever.

I can't just do a simple DoCmd.GoToRecord, because the "object isn't
open".
I can't setfocus on the dam object, because I can't seem to find it in
ANY collection!?!?!?

Forms("MainForm!SubForm").SetFocus (and all the syntactical
variations) DOES NOT work; apparently because I need to address the
tab. I can't figure out how to setfocus to the sub-form under the tab
in order to do a GoToRecord.

AND - I'm not even sure that once I do this, if the ----'g GoToRecord
will even work!!!!!!

Why the blazes is something that seems so easy, so freaking hard????
any help appreciated...
TIA

See if this reference helps....
http://groups.google.com/group/micro...222879d4a7e476

How are you linking the two subforms together? Are you using
Filter/FilterOn?

Have you considered scapping tabbed pages? For example, in the main
form open a form/subform with the linking done for you? IOW, search for
your person then open a form with person data and the calls below?

Jun 15 '06 #2
OK -
update:

TX for the reply; I did finally access my tabs correctly. BUT - here's
the REALLY WEIRD part:

after I finally was able to do the setfocus I thought I needed -
everything just started working!?!?!

I've now deleted the "add new record" button, and ALL code from the
sub-form, AND the >* nav button now works!?!?!?!?!?!

I have absolutely no idea what the F'g problem was - I have changed
NOTHING of the core functionality. It wasn't working 1st thing this
morning, and after I figured out an alternate approach, I no longer
need the alternate approach!?!?!?!?!

I really hate this kind of crap.

bo*************@gmail.com wrote:
running access 2k; adp w/ linked tables to SQL server;

I am absolutely stymied, and ticked off beyond belief - I can not
believe how much time I've wasted trying to do something that should be
comically easy!!!!!

I have 2 tables: T_people, T_calls in a 1 to many relation (many
calls to each person).

I have a form with tabs in it. the form is NOT attached to a record
source. The first tab is filled with UNBOUND fields relating to
T_people. The fields are unbound with no recordsource, because I don't
want users to "browse" the records. They must enter an exact ID#, to
pull up a record. THIS WORKS JUST FINE (obviously, I have code that
does the lookup).

The 2nd tab contains a sub-form which should show only calls related to
the selected person in tab 1.

This sub-form has T_calls as its record source, and filtered by
person_id.
If I open this sub-form ALONE, I have no problem adding records. the >*
nav button is available, and works. As soon as I open the main form
with tabs, and goto this sub-form, the >* nav button is greyed out. I
added a button to this subform "add new call", with code that does a
"DoCmd.GoToRecord".

This button/code fails miserably, and I have tried EVERYTHING I can
think of and MANY permutations on stuff I've read about in this group,
with no success what-so-ever.

I can't just do a simple DoCmd.GoToRecord, because the "object isn't
open".
I can't setfocus on the dam object, because I can't seem to find it in
ANY collection!?!?!?

Forms("MainForm!SubForm").SetFocus (and all the syntactical
variations) DOES NOT work; apparently because I need to address the
tab. I can't figure out how to setfocus to the sub-form under the tab
in order to do a GoToRecord.

AND - I'm not even sure that once I do this, if the ----'g GoToRecord
will even work!!!!!!

Why the blazes is something that seems so easy, so freaking hard????
any help appreciated...
TIA


Jun 15 '06 #3
bo*************@gmail.com wrote:
OK -
update:

TX for the reply; I did finally access my tabs correctly. BUT - here's
the REALLY WEIRD part:

after I finally was able to do the setfocus I thought I needed -
everything just started working!?!?!

I've now deleted the "add new record" button, and ALL code from the
sub-form, AND the >* nav button now works!?!?!?!?!?!

I have absolutely no idea what the F'g problem was - I have changed
NOTHING of the core functionality. It wasn't working 1st thing this
morning, and after I figured out an alternate approach, I no longer
need the alternate approach!?!?!?!?!

I really hate this kind of crap.


Your computer hates you. It thought, "let me screw around with Bob".
To teach it a lesson, unplug its power cord. You'll feel better.

Jun 15 '06 #4
I think that's an OK idea -
I have a better one that involves a sledge hammer......
maybe a slow, painful virus or two.....

I discovered the reason (I think :)- turns out someone added a BOUND
field to the sub-form that was bound to a field that no longer exists,
AND this field was hidden behind another object!!!!!!

where's my solve-any-problem device at???? (that would be the
sledgehammer - which, by the way, actually sits on top of my desk 24/7
- today is probably a day someone should take it away from me
before.... ;-)

salad wrote:
bo*************@gmail.com wrote:
OK -
update:

TX for the reply; I did finally access my tabs correctly. BUT - here's
the REALLY WEIRD part:

after I finally was able to do the setfocus I thought I needed -
everything just started working!?!?!

I've now deleted the "add new record" button, and ALL code from the
sub-form, AND the >* nav button now works!?!?!?!?!?!

I have absolutely no idea what the F'g problem was - I have changed
NOTHING of the core functionality. It wasn't working 1st thing this
morning, and after I figured out an alternate approach, I no longer
need the alternate approach!?!?!?!?!

I really hate this kind of crap.


Your computer hates you. It thought, "let me screw around with Bob".
To teach it a lesson, unplug its power cord. You'll feel better.


Jun 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5341
by: ivan | last post by:
I have a form (CustomerImfo) that has a subform within it (order). Within that subform is another subform (OrderDetail). That subform (OrderDetail) is displayed in Datasheet view. When I am...
1
3030
by: Max Harvey | last post by:
Hi, I made up a nice little form which had its own sub form in it. I made a litle VB code so that when I pressed a button it would move form the form (frmConference) to the subform...
7
11164
by: ChrisR | last post by:
Hi guys My app is a simple Main form with a few Subforms that are not linked, and a few pop forms. Problem is: I have a pop form with a Listbox with a list of records related to the...
2
2820
by: CSDunn | last post by:
Hello, In an Access 2003 ADP Subform, I am trying to set the BackGround color of three textbox fields (LSScore, RScore, WScore) in the current record of the subform to zero (black) if the value of...
25
10162
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
18
13555
by: Darryl Kerkeslager | last post by:
I don't do much with subforms - in fact I've deliberately avoided them - but .... I have a tab control that will contain several subforms, each bound to a separate table, and each table/subform...
5
5214
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test...
1
1362
by: ckirby | last post by:
I have a situation where I'm trying to add a text field to allow large Notes to be linked to record in an existing table (rather than simply adding the new field into the table since relatively...
1
2092
by: Holmsey | last post by:
Hello All, I am creating a database form that has 5 tabs, with each tab holding a subform. On the first tab I want to Highlight certain words that appear in one of the subforms. The words I am...
0
7081
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6737
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6921
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5336
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4776
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.