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

Linking records

Status
Not open for further replies.

pleg12345

IS-IT--Management
Dec 21, 2003
48
EU
My first form is a customer details form.

My second form is a customer check form which is related to the same table.

However i want the details in my second form to link to the specific record on my first form.

After completing the first form i want to click a button which takes you to the next form, then fill in the alternative details then save these details to that current record.

Can anyone please help
 
Hi,

Do you have a unique customer id?

If so you want something like:

Dim ID as int
ID = txtCustID

Docmd.OpenForm "form2",,CustID = ID

Obviously with the correct names:

txtCustID = the text box on your first form that holds the customer ID

form2 = the name of your second form

Nowell
 
Yeah i have a unique ID no called enqID, the textbox called EnquiryID.

Can i just query a few things with you,

does txtCustId- relate to the textbox where my ID is stored

does CustID stand for my actual name of the ID no?

I inputted the code below but it didnt work, any help?

Dim ID as INT
ID = EnquiryID

docmd.Openform "tblCallB",,enqID = ID

EnquiryID = EnquiryID

tblCallb = tblCallb
 
Hi,

Sorry firstly it should be

Dim ID as Integer


what is this?

EnquiryID = EnquiryID

tblCallb = tblCallb

What error did you get?
 
txtCustID i thought was the name of the text box of the ID in the first field?

So i did

EnquiryID = EnquiryID

Should one of them be a field in my second form?

Form2 i thought was the name of my second form so i did

tblCallb = tblCallb

Errors are just stating, variable not defined for tblCallB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top