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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign number to check box issue

Status
Not open for further replies.

miaka13

Technical User
Jul 31, 2003
30
0
0
US
Ok this is going to be hard to explain. I have 2 forms: form A and form B. Form A contains several check boxes. The users are able to check multiple check boxes in this form. Once the user checks a box, form B opens up. There the user answers a few questions and returns to form A to start the process over.

The problem that I am having is that I need to assign a number to each check box so that the number of the check box will write to form B and then write to the table. I have figured out how to assign a number to one box and carry it over to form B, but I can only get it to work with one checkbox. Any help will be greatly appreciated! I'm still pretty new at VBA coding so please be gentle with me.
 
Several ideas come to mind
"ONE" create a global variable and pass it from the checkboxes afterupdate event
like so
this goes in a module
Option Compare Database 'this is porpably already there
Global myvalue ' add this whole line

in the check boxes afterupdate event do this
Private Sub check3_AfterUpdate()
myvalue = "X"
End Sub

then check that value in the new form.
If myvalue ="X" then
' do something here
Else
'do something else here
End if


DougP, MCP
 
Alright! That did the trick! Thanks bunches! :)

I have one last question for you. I have a subform with a multiselect list box in it. I am unable to figure out how to write a code to tell my subform to "clean" the mulitselect list box for the next user. Every time I bring up the form, I am getting the information from the previous item. HELP!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top