June,
Thank you for the reply. While I think I sort of see what you mean, I have no idea how to do that. Do you happen to have an example or a slightly more step by step version?
Thank you again!
I have no idea what filter criteria you want but here is simple example of OpenReport:
DoCmd.OpenReport "report name here", , , "ID=" & Me.ID
Most often the code is in button Click event.
Access VBA Help has more info on OpenReport (and OpenForm) arguments.
Here is a tutorial for parameterized query as report RecordSource http://www.datapigtechnologies.com/f...mtoreport.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June,
Thank you again! It looks like that did the trick. I am going to do a bit more fiddling around, but I think all is well now.
![]()
June,
Due to a change in the functionality, I am trying to make a small change, but I can not seem to get it to work.
ComboboxOptions
ComboboxSubOption1
ComboboxSubOption2
There are 3 options in the ComboboxOptions: All, Dog, and Cat. The change is in senario 3.
Senario 1: When ComboboxOptions = All, ComboboxSubOption1 and ComboboxSubOption2 are hidden.
Senario 2: When ComboboxOptions = Cat, ComboboxSubOption1 is visible and ComboboxSubOption2 is hidden.
Senario 3: When ComboboxOptions = Dog, ComboboxSubOption1 and ComboboxSubOption2 are both visible.
I tried to add "and", "&" and "or" in various places, but I get the error that it will not validate or that it is expecting something else in the expression.
With the following code, I was able to make senario 1 and 3 work, but senario 2 has both combo boxes hidden.
Private Sub ComboboxOptions_AfterUpdate()
Me.ComboboxSubOption1.Visible = Me.ComboboxOptions = "Cat"
Me.ComboboxSubOption2.Visible = Me.ComboboxOptions = "Dog"
Me.ComboboxSubOption1.Visible = Me.ComboboxOptions = "Dog"
End Sub
Do you have any idea how to make it work as desired?
Thank you!
Try:
Me.ComboboxSubOption1.Visible = (Me.ComboboxOptions = "Cat" Or Me.ComboboxOptions = "Dog")
Me.ComboboxSubOption2.Visible = Me.ComboboxOptions = "Dog"
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June,
Thank you!!!!!