add record via seperate form

Ashleyjp1985

Registered User.
Local time
Today, 20:06
Joined
Jul 6, 2011
Messages
22
Hi,

I have a sub form that is based on a 2 table query. The query brings together details from a customer details table and a customer businesses lines table

The tables are linked on the Primary key Customer ID field (a customer can have many lines) with the business line table also having a Business Line ID

The query is displayed on tab control as a sub form. I have set up the datasheet so that when the user double clicks on the Business Line ID field of a row another form opens displaying the contents of the row.

i have extended this so that when a user double clicks the Business Line ID on the new record row the form opens at a blank record. However the Customer ID is not carried over to the from the subform so i cant save the record. i also need the customer name carried over aswell.

Any help?
 
One way would be to use the OpenArgs argument of the DoCmd.OpenForm method. Use this to 'pass' the value of the customerID to the form and then in the forms Open Event add this to the customerID textbox.
 
Hi,

thanks for responding. I've tried this and it used to work but no longer!

I have a subform which then includes another subform on a tab control.

in datasheet view when i used to expand the 2nd subform it used to auto include the 1st subforms primary key which i could then pass to my pop up form.

for some reason it is no longer auto include the primary key.

Help?
 

Users who are viewing this thread

Back
Top Bottom