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

Linking forms using the same data

Status
Not open for further replies.

mattpearcey

Technical User
Mar 7, 2001
302
GB
I have a database that i have built that has, at present, one form that has multiple tabs. However, i want to be able to clcik on button to open another form to enter a commments field but i cannot get the names and the automatic numbers to carry over to the new form. so it look like they are not related?! i have gone into relationships and i think i have link them correctly, but still no luck!

Any suggestions?

Matt
 
Matt

Not sure if I've understood the situation so here goes.

My first thought is to have another tab sheet on your form and add a subform for the comments , using the Link Master and Child fields will sort out your linking problem.

The other way is to create a couple of text boxes on the form your opening and then send values to those fields from your main form. The code to do this would have to go in the On Click event of your button after the openform command. You could then refer to these fields in your form record source.

hope this helps - if not e-mail me with some more info and I'll see if I can help.

Regards

Chris
 
Matt:
To open your other form you have to use a command sort of like this:
DoCmd.OpenForm "NameOfYourNotesForm", , , "[RelatedIDFieldNameOnTheNotesForm]= " & Me![NameOfTheMasterIDFieldOnFirstForm]

Forms![NameOfYourNotesForm]![NameOfYourRelatedIDDieldNameOnTheNotesForm].DefaultValue = Me![NameOfTheMasterIDFieldOnFirstForm] Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top