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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want a main form and subform to d

Status
Not open for further replies.

drkestrel

MIS
Sep 25, 2000
439
GB
I want a main form and subform to do something like the following-
___________________________________________________________
Main Form: (Linked to Table A)
Field X: txtboxFieldX
......
Field Y txtBoxFieldY
[Subform B Linked to Table B]
Combo1 (find records)
TxtBox1 (linked to field1)
Txtbox2
]
The subform's find record's codes are-Me.Recordsetclone.FindFirst("Field1=" & Me![combo1])
Me.Bookmark=Me.RecordsetClone.bookmark

The subform and the main form are linked as
Field1-Fieldx

The subform does the searching and current record updating fine ON ITS OWN.

When subform is linked in...the searching failed, nor doesthe txtbox1 get updated as combo1 is changed.

Ideally, I want the subform on a Tabbed page on the main form, but that is even more tricky!!!

Any clues?

[sig][/sig]
 
you mean instead of a grid or data sheet view you want it to appear as the main form does or even to appear as though there is no other form at all. [sig]<p>DougP, MCP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.[/sig]
 
Basically I have Two tables-
Employee-
Manager staff number
etc etc.

Manager table-
Manager Staff Number, etc etc.

Main form's data source is Employee table.
Subform's data source is Manager table.

Subform has a combo box which selects three data fields (surname, firstname, manager number) which would update other text boxes (the surname,firstname, etc. etc. of the manager) on that subform.

The 'search' (ie textboxes being updated by 'After Change' event's VB code on the combo box works.

Now, plug that subform onto the mainform with staff manager as 'links' (regardless of whether textbox whose data source is manager staff number is on that main form) and the 'search' fails.

I think the only occasion when the subform actually works is when no links are set between the main and sub forms, though that definitely is not what I want because I want the manager staff number field in the employee table (which the main form has as data source) to be updated (ie 'select' from the subform, or enter new manager details on the subform, with the manager's staff number stored in the main form).
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top