VBA HELP PLEASE FOR A LEARNER (1 Viewer)

ATB

Registered User.
Local time
Today, 00:35
Joined
Dec 7, 2000
Messages
30
I AM CURRENTLY TRYING TO REPLACE ALL MY MACRO'S BY USING VB BUT AM STUCK ON GETTING A DCLICK EVENT TO OPEN ANOTHER FORM ON THE SAME RECORD.

CAN SOME ONE POINT ME IN THE RIGHT DIRECTION IN WHICH TO LOOK.

SHOULD I BE LOOKING AT THE WHERECONDITION WITHIN THE DOCMD.OPENFORM FORMULAR?

ANY REPLIES WELCOME.

CHEERS
 

Neal

Registered User.
Local time
Today, 00:35
Joined
Feb 17, 2000
Messages
116
Yes, the where condition has to provide the second form with infomation on what record to open. If the relevant field is ID, your where clause would be (in quotes)"
"[ID] = forms!YourFirstFormName!ID"
That says the ID of the record in the second form has to match the ID of the record in the first form.
 

ATB

Registered User.
Local time
Today, 00:35
Joined
Dec 7, 2000
Messages
30
Thanks for your reply,

i am still having a spot of bother wiht the code. below i have pasted the code i am using can you tell me whta ive done wrong.

DoCmd.OpenForm "invoice", acNormal, , "[ID] = forms!f_outstanding invoices!ID", acFormEdit, acWindowNormal

thanks
 

A real begineer

Registered User.
Local time
Today, 00:35
Joined
Nov 4, 2000
Messages
74
I think your code should read:

DoCmd.OpenForm "invoice", acNormal, , "f_outstanding invoices", acFormEdit, acWindowNormal
 

Users who are viewing this thread

Top Bottom