Dependent combo boxes

when you say framename in my case this would be option1=1 right?

optgrpframe.PNG
 
as i mentioned in post 8, you want it in the after update event of the option group (the frame). You still have it in the after update event of the combo. When using an option group, you test the value of the frame, not the individual selections within the frame. The frame will have the value of the selected item. So,

if me.framename = 1 then
thanks guys
 
As I mentioned in post 8, you want it in the after update event of the option group (the frame). You still have it in the after update event of the combo. When using an option group, you test the value of the frame, not the individual selections within the frame. The frame will have the value of the selected item. So,

If Me.FrameName = 1 Then
im not sure if this should go in a different thread but i will post it here for the mean time.

everything i have asked about is running smoothly but i dont know how to do the following.

I currently have 2 frames, 2 options in each.
I have 4 macros that work perfectly, using the combo boxes as their criteria queries).

I want to be able to say things like:

if frame1 = "1" and frame 2 = "1" then run macro 1
if frame1 = "1" and frame 2 = "2" then run macro 2
if frame1 = "2" and frame 2 = "1" then run macro 3
if frame1 = "2" and frame 2 = "2" then run macro 4

I would like this under one command button that is called view. Can you help?
 
One way:

Code:
If Me.Frame1 = 1 And Me.Frame2 = 1 Then
  DoCmd.RunMacro "Macro1"
ElseIf Me.Frame1 = 1 And Me.Frame2 = 2 Then
  DoCmd.RunMacro "Macro2"
...
 
One way:

Code:
If Me.Frame1 = 1 And Me.Frame2 = 1 Then
  DoCmd.RunMacro "Macro1"
ElseIf Me.Frame1 = 1 And Me.Frame2 = 2 Then
  DoCmd.RunMacro "Macro2"
...
Thanks once again

This has bugged me for the last couple of weeks, and i eventually thought that i could complete the database withot this feature, but i think you may be able to help me:

How on earth do i change the "return value" amount of the query through a form?
The return value button being the one that offers 5,10,20,All,5%,10% etc
 
That sounds like the Top Values selections. To my knowledge, there's no way to have a query refer to a form for that value. You would have to build the SQL of the query in VBA code.
 

Users who are viewing this thread

Back
Top Bottom