Newbee Question

Docmd.OpenReport Me.NameOfListbox.value
 
I placed this command in the Onclick event field and received the following:

MSAccess cant find the macro 'Docmd.'
the macro(or its macro group) doesn't exist or the macro is new and hasn't been saved.
Note that when you enter the macrogroupname.macro syntax in an argument, you must specify the name of the macro's macro group was last saved under.


???
 
1. Click the elipsis button on the On Click EVENT.
2. Select Code Builder from the list and click OK.
3. Enter the code where the cursor is placed.
 
That appears to work fine .... many thanks to all. This is a great place to find answers and get assistance!!

How would I change the syntax to get print preview?
 
Open up the Access help file and type in DoCmd.OpenReport. You will be able to find the right argument for this.
 
Found it .....

Thanks again for all the help!!!
 
No good effort and assistance goes without followup thoughts and questions.

Is there a way in the syntax below to restrict the reports to only those that begin with "C"?

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=-32764));

Thanks once again
 
Sure:

WHERE (((MSysObjects.Type)=-32764) AND Left(MSysObjects.Name, 1) = "C")
 
Awsome ..... thanks again. I have learned a great deal with your help!!
 

Users who are viewing this thread

Back
Top Bottom