running a Query from a Menu

Paul_birm

Registered User.
Local time
Today, 08:18
Joined
Jul 15, 2008
Messages
30
hi all

I have 5 query's that i want my users to run from a menu ( not a switchboard).

so when then click on option one... report one runs ... simple he??:mad:

when i click or on option radio button NOTHING happens

the VBA behind the option is :-

Private Sub opt_report1_GotFocus()
On Error Resume Next
DoCmd.OpenQuery "Qry_ReportScore)", acViewNormal
End Sub

can anyone suggest anything that I may have missed

many thanks in advance !

Paul:)
 
hi all

I have 5 query's that i want my users to run from a menu ( not a switchboard).

so when then click on option one... report one runs ... simple he??:mad:

when i click or on option radio button NOTHING happens

the VBA behind the option is :-

Private Sub opt_report1_GotFocus()
On Error Resume Next
DoCmd.OpenQuery "Qry_ReportScore)", acViewNormal
End Sub

can anyone suggest anything that I may have missed

many thanks in advance !

Paul:)
The line ON ERROR RESUME NEXT will essentially mean that any error that is found will be ignored :eek:. Remove this line and then you will probably get a more useful error message about the do.cmd line. Maybe the query name is wrong particularly as you have a bracket) in it.

You are right to include error handling once your code is working. But this should be implemented with a proper error handling procedure, and not just ignoring it as you have done here.

Also, do you really want to use the Gotfocus event. This will only fire when you move from another control to this one. Maybe the on click event will be better.

hth
Chris
 
Chris,
changed the ) to " and took out the error trapping and it seemed to work.

also :- no Click Event??? only
GotFocus
LostFocus
MouseDown
MouseUp
MouseMove
KeyDown
KeyUp
KeyPress

any ideas why that would be ??? - but thanks for the answer above !

Paul_Birm
 

Users who are viewing this thread

Back
Top Bottom