Passing textbox data and populating the rest of the form

Annoscia85

Registered User.
Local time
Today, 04:17
Joined
Aug 16, 2011
Messages
32
Hi,

I'll explain what I'm trying to do first...

I have two tables (Costing_Main and Costing_Sub) and two forms, one my first form (Dashboard) I show 4 columns from my costing_main table, these are:
Part_No
Enquiry_No
Revision
Current_Date

On my 2nd form (frmEnquiryDetails) I want to show all of the columns from both tables using the control sources. I pass the Part_No textbox value from my first form to the Part_No textbox on my second form using a button....this works fine by using the following code..


Private Sub Open_Form_Click()

DoCmd.OpenForm "frmEnquiryDetails"
Forms!frmEnquiryDetails.Part_No = Me.Part_No

End Sub

What I want to happen is when the Part_No value is passed over to the second form (frmEnquiryDetails) I want it to populate the remaining textbox's with the data from the two tables.

I can populate these textboxes on frmEnquiryDetails by using DLookup's whilst entering the Part_No on form two then pressing tab, but I want it populated by using the button on the first form? Can anybody help with this?
 

Users who are viewing this thread

Back
Top Bottom