continuos to populate single form

John thomas

Registered User.
Local time
Today, 07:34
Joined
Sep 4, 2012
Messages
206
Hi I have a continuous form that displays all my customers .I want to be able to dble click a customers ID and go to there customer details form
 
Hi Paul
Thanks for getting back to me
Im not shure if your answer is what i want
Basically from my contiuous form i want to be able to select a customers record by dble clicking it and open up there full customer details record

I am new to vba i find it very difficult to use the editor especially if i make a mistake and want to delete anything
 
Hi paul I have tried the code but it will not work .This is my code

Private Sub IDCustomer_DblClick(Cancel As Integer)
DoCmd.OpenForm "customer details", , , "IDCustomer = '" & Me.IDCustomer & "'"
End Sub

I am in my contiuous form named customer details2 I have attached the event to the IDCustomer Field which is auto no
Customer details is the the main customer Form with all the customers details. Me. IDCustomer is the auto no Field in my oriinal form That i presume needs to be copied over, to open the single form
I get this error message
Expected identifier and goes on to say it musnt +a field
Hope you can help john
 
If it's an autonumber field, you need the numeric syntax from the link. You might also need to bracket the form name because of the inadvisable space.
 
Hi Paul
Thanks for your continuing help I will try again would those brackets be square or Normal
John
 
Square; try:

DoCmd.OpenForm "[customer details]", , , "IDCustomer = " & Me.IDCustomer
 
No problem. That worked okay?
 
Hi Paul
No it didnt THis is the code
DoCmd.OpenForm "[customer details]", , , "IDCustomer = " & Me.IDCustomer
I checked the name in the data sheet and it was diffrent label 22 so i changed it to customer details but it still brings up the same error
 
Can you post the db here?
 
I would, but it doesn't sound like the cause of the problem. Add

MsgBox Me.IDCustomer

and make sure the right value is being returned.
 

Users who are viewing this thread

Back
Top Bottom