This is the syntax
If [myUniqueField is a numeric field
DoCmd.OpenForm "jobdata", , , "[myUniqueField] = " & [myUniqueField]
If [myUniqueField is a textfield
DoCmd.OpenForm "jobdata", , , "[myUniqueField] = '" & [myUniqueField] &
"'"
If [myUniqueField is a date field
DoCmd.OpenForm "jobdata", , , "[myUniqueField] = #" & [myUniqueField] &
"#"
On the left hand side of the = sign, [myUniqueField] is a field name on
the
form being opened. On the right it is a textbox or other control name on
the calling form.
Hope the helps you. God Bless,
Mark A. Sam
CP said:
Yes I am - I am a novice at this and this problem is one I cant get
over
and
I dont know the coding.
Main Form - "Cust"
Sub form - "jobssubform"
Form I wish to open on double click - "jobdata"
So whilst using "cust" to find the customer which shows jobs related to
that
customer in "jobssubform" I double click the job no (the unique ref in
the
related table) and it should open the form "jobdata" showing the
related
job
(assuming jobdata uses the same unique ref)
So can you help with the coding please
Thank you in advance
I am sure this is in the help section of the program but I cant type
anything in that brings this information up.
:
If you are asking how to use the double click event on the subform,
place
the code in the double click event of the textboxes.
God Bless,
Mark A. Sam
I have a form showing "clients" and on that form is a related
subreport
in
dataview showing "clients jobs"
I have first used a combo box to choose the client I want and listed
in
the
subreport are the jobs relating to that client
I want to then double click one of the lines in the dataview and
that
then
take me to another form showing the job I double clicked.