Objects in question:
Form: Add a Scouting Event
-Command button and combo box found at bottom of form
Report: Scouting Forms
-College text box is just randomly placed for now.
Objects in question:
Form: Add a Scouting Event
-Command button and combo box found at bottom of form
Report: Scouting Forms
-College text box is just randomly placed for now.
Ok I used this for my code:
Private Sub Print_All_Team_s_Forms_Click()
DoCmd.OpenReport "Scouting Forms", acViewPreview, , "School = '" & Me.Team & "'"
End Sub
Now I am able to atleast get the Scouting Form Report to open, however, it does not filter the records at all. Well it is filtering, just not the way I want. It shows the Report as an empty record.
Did you delete the sample? I never downloaded it. You're treating the field as text now, rather than numeric.
Oh boy, I'm getting somewhere. I had to change the combo box to just a regular ol' boring text box, but now the user really can't verify if they are inputting the School Name correctly.
I'm wondering if maybe there is a way around this? Maybe have whatever value is selected in the cbo box go into the Text box? I'm not sure that is even possible. Then I could just hide the text box via transparent background, font color, etc.
You can certainly copy the selection in the combo to a textbox, but why? It should work with the combo, presuming the data in the combo is appropriate to the field in the report. Was there something wrong with the sample db?
Well, I was able to make it work with typing in a text box, but not by picking from the drop down list in the combo box.
Obviously, I'm putting something in wrong with my code. I tried both ways, treating the data as if it were a number and I tried it as text, as far as doing the code.
I can upload the database again.
Form: Add a Scouting Event
Report: Scouting Forms
Last edited by yes sir; 10-01-2010 at 11:29 PM. Reason: removed attachment
Are you able to take a look?
You have a mismatch between the bound column of the combo, which is the numeric value, and the School field in the report, which is the text value. Try this:
DoCmd.OpenReport "Scouting Forms", acViewPreview, , "School = '" & Me.Team.Column(1) & "'"
Happy to help.