Hi;
Started searching for information regarding opening a frm using different
qrys.
Put a smile on my face when I found that Niel M. had asked the question
and
that Graham Search had answered it.
Thank You gentlemen.
Would You be so kind to supply some more information.
Created frmUnbound. Added txtControl. Control Source: FirstName
Created qryFirstName, Field: FirstName: [FirstName] (using
tblClientNames)
Created qryFullName, Field: FirstName: [FirstName]&" "&[LastName] (using
tblClientNames)
Created frmCmdButtons.
cmdButton1: DoCmd.OpenForm "frmUnbound", , "qryFirstName"
cmdButton2: DoCmd.OpenForm "frmUnbound", , "qryFullName"
When the frmUnbound opens the Control displays: #Name?
Then to frmUnbound set Record Source as: tblClientNames.
The Control only displays the First Name no matter which cmdButton is used
to open the frm.
What am I missing?
Thank You.
Andy
Graham R Seach said:
Neil,
This isn't hard, and its something you could find out for yourself,
simply
by checking either the Help file, or by using Intellisence:
DoCmd.OpenForm "frmFormName", , "qrySomeQuery"
...or...
DoCmd.OpenForm "frmFormName", , , "[somefield] = 123"
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
Neil M said:
I have a command button on my main form that shows VIEW JOB IDI want to be
able to press this button and it opens up my normal JobDetails form using
a
different query, somehting like this;DoCmd.OpenForm "JobDetails",
QUERY??whats the exact coding for this or even better i want to user to
input a job id, so the domc.dopenform command where it can ask for user
input for one of the fields.
Thanks.
Neil