Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option groups on a form automatically running a query???? 2

Status
Not open for further replies.

jane30

Programmer
Nov 14, 2000
92
US
Hi, there! I have 2 switchboard:
SwbMainMenu

frame1
opt1 run query
opt2 print report

There is no default value for this option group.

When users select option 1, they will be led to SwbSubMenu:
SwbSubMenu
frame2
opt1 qry1
opt2 qry2
opt3 qry3
When users select one option, it'll start running a query.
There is no default value for this option group, either.

Mainmenu is brought up by AutoExec.mcr. My problem is everytime I open the database, it automatically select option1 on MainMenu and starting the 1st option on Sub Menu. The code I use is opt1_GotFocus.

Why Access automatically run? Any way to prevent this?

Many many thankyous in advance

 
Try using the Frame's On Click event. Here I would put..

Private Sub Frame0_Click()
Select Case Frame0
Case Is = 1
DoCmd.OpenQuery "Query1"
Case Is = 2
DoCmd.OpenQuery "Query2"
End Select
End Sub

Hope this helps. ljprodev@yahoo.com
ProDev
MS Access Applications
 
Hi!
1. Check for run command in procedure "Sub Form_Load()"!
2. Maybe you have macros "Autoexec"? If so then check it, too.
Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top