listbox/radio buttons

brighteyes

Registered User.
Local time
Today, 13:11
Joined
Oct 12, 2004
Messages
14
I've got a DB with this table, Systems.

Ive got this form that has 2 option buttons; optCheckIn and optCheckOut. It also has a listbox called lstComputers.

Depending on which option is selected, I want to run a query against systems to populate lstComputers. If optCheckIn is selected, I want to populate lstComputers with SELECT * FROM Systems WHERE Status = In; and if optCheckOut is selected I want to populate lstComputers with SELECT * FROM Systems WHERE Status = Out.

I keep trying code like

If Me.OptCheckIn = 1 Then
Me.lstComputers = "hello"

just to see if i can populate it with anything, butt thats not really working out either.

anyone have any code off the top of their head to help out a frustrated newbie?

Thanks
 
Set your status Data Type in System table to Yes/No and assign to the Radio Button in your form following Option values: In -> -1 (true), Out -> 0 (false)

HTH

Filippo
 

Users who are viewing this thread

Back
Top Bottom