Need help with syntax

N

newaccess

I am very new to access and trying to create a simple database.The for
has an input text called documentnumber in which the user inputs dat
of the form xxx-xxx-aa where "x" can be any alphebet and "a" can be an
number(eg"ext-frm-33") .After entering this input the user will hit th
run button which will exceute a query to show the output.Usin
buttonwizard I connected my query to the commandbutton and the syntax
used for queryis "=[form]![myform]![documentnumber]" .However I am no
getting anyoutput.Basically there is one table and one form in my D
and table has fileds namely documentnumber,issuedate an
revisedate.when user inputs documnet number and run the query th
output should display the issuedate,revisedate for the correspondin
document number input.Can someone pls. help me with fixing thi
query?Is there anything wrong with my syntax?Is there any other way o
doing this?Please help.Thanks
 
N

newaccess

Hi Thankyou for your reply.I tried givin
[forms]![myform]![Documentnumber] and even then it does not work.I
there any other way this can done?please suggest
 
N

newaccess

Instead of typing the query,I did a rightclcik-build on the criteria o
the query grid and it worked.Thankyou.Can you please tell me how t
connect my runbutton in the form to a report?Rightnow, I have the quer
connected to my runbutton through the buttonwizard and the ouput i
displayed in the datasheetview of the query.What should I do inorder t
display the output in the form of a record?Any guidence is truel
appreciated
 
G

Graham R Seach

I don't quite follow what you mean when you say *in the form of a record*.

Do you mean you want to display a report containing the dataset returned by
the query? If so, build a report to display the data as required, and bind
the report to the query. Then use the Button Wizard (on the form) to build
the code that calls the report.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Top