Connecting Tech Pros Worldwide Forums | Help | Site Map

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

bobg.rjservices@gmail.com
Guest
 
Posts: n/a
#1: Jun 15 '06
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


salad
Guest
 
Posts: n/a
#2: Jun 15 '06

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


bobg.rjservices@gmail.com wrote:[color=blue]
> 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
>[/color]
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?

bobg.rjservices@gmail.com
Guest
 
Posts: n/a
#3: Jun 15 '06

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


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.

bobg.rjservices@gmail.com wrote:[color=blue]
> 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[/color]

salad
Guest
 
Posts: n/a
#4: Jun 15 '06

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


bobg.rjservices@gmail.com wrote:
[color=blue]
> 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.[/color]

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.

bobg.rjservices@gmail.com
Guest
 
Posts: n/a
#5: Jun 15 '06

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


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:[color=blue]
> bobg.rjservices@gmail.com wrote:
>[color=green]
> > 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.[/color]
>
> 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.[/color]

Closed Thread