Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysterious disappearing data on subform when tabbing out

Status
Not open for further replies.

netscamp

Technical User
Oct 3, 2003
19
0
0
US
I have a form with several subforms.

To jump between subforms, I have an event triggered from the last text box of the subform telling it to set focus on the next subform. It works for tabbing around the form.

The next step I took was to enter test dat in a subform, when I did so, then tabbed out to the next subform, the test data I entered disappeared. (!!?)

Do I need to have some coded update of the underlying table ? I hope not, because I don't want to do that until the user has gone through all the subforms and then clicks to accept
 
[tt]
Hi:

Is the data in the underlying table?[/tt]

[glasses][tt]Gus Brunston - Access2000(DAO Intermediate skills.
Webmaster: www.rentdex.com[/tt]
 
Now that you mention it, yes!. The data was transferred to the table.

I'm wondering how I can stop that until a user has filled all subforms and sends all data to tables at once.

Thanks for the repsonse,
Robert
 
[tt]
Well, the data hasn't disappeared. That's a start. When the data is there, all one has to do is display it, edit it, manipulate it, calculate with it, or delete it.

I'm probably not the one to help you with this. I use a lot of subforms but usually only one on a master form. But when the focus leaves the subform and goes to the master form I can still see the data on the subform.

I use tab controls, and put different sub forms on the different tabs, but when I click back to another tab the data I entered in that tab remains visible.

You might profit from looking at the fields that link your subforms to the master form. Again, as long as you don't change the record you're working with in the master form the data should still be visible in the subform(s).

The master/subform construct is designed for tables with a one-to-many relationship. Perhaps you should make sure that kind of relationship is established between the table that contains the data for your master form and the table(s) that contain the data for your subforms.

tblA = the one side of the relationship
tblB = the many side of the relationship
tblC = the many side of the relationship
tblD = the many side of the relatiohship
etc.

Master and sub form(s) are linked with valid Master and Child fields.

Child field in subform
=
Master field in main form

Master form -> one record in tblA
Sub form 1 -> many records in tblB
Sub form 2 -> many records in tblB, C, D or etc.

HTH

Cheers,[/tt]


[glasses][tt]Gus Brunston - Access2000(DAO Intermediate skills.
Webmaster: www.rentdex.com[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top