Combo boxes and check boxes

M

mikeinohio

I have a combo box on a form that have items 1 - 10, and I have a report that
will have items 1 - 10, what i need to figure out is, if i select item 8 on
the form, then checkbox 8 on the reprot will have a check in it, i search the
world and cant find the solution, please help!!!
 
A

Al Campagna

mikeinohio,
Given a form (frmYourMain), with a CheckBox named Check8 (T/F Boolean).
Given a CheckBox control named Chk8 on a report, use this code in the
OnFormat event of the report section where Chk8 occurs...

If Forms!frmYourMain!Check8 = True Then
Chk8 = True
End If

THat just handles one checkbox. You'll have to do the same for all ten
checkboxes.
I'm assuming your form is an unbound form, because... if it was a bound
form, I'd expect to see Chk8 getting it's value from the table bound to the
form... rather than getting it from the open form itself.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
M

mikeinohio

Al thanks for the advice, what i meant is i have a "combobox" with 10 items
in it in the form of a dropdown, and when something is selected in the
dropdown its corresponding checkbox on the report is selected if that is
making sense. what i am tryingto do is avoid too many checkboxes on my form
while entering the data but on the reprot the check boxes must be there
regardless if an item is selected or not. because each section where the
pulldows aree on the form cannot have more than one item selected.
 
A

Al Campagna

mikeinohio,
Well, I think I know now what you're trying to do...
Given a combo box on a form, with ten items, named cboItems, and a
report with 10 checkboxes... you could use the report's query or the
report's OnFormat event to mark the correct checkbox as True.
Using the OnFormat of the checkbox section of the report...
(use your own control names)
Select Case Forms!frmYourFormName!cboItems
Case "Choice1"
Me.chkOne = True
Case "Choice2"
Me.chkTwo = True
etc... for all ten

OR... you can use an multiple If - Then statement.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

my combo boxes 2
"Reset" combo boxes 4
Combo Boxes/Queries 1
Cascading Combo Boxes (Multiple boxes) 13
combo boxes 8
synchronize combo boxes 1
synchronize combo boxes 7
refresh combo boxes on form 6

Top