Option group

sandrothaver

Registered User.
Local time
Tomorrow, 00:04
Joined
Jun 13, 2008
Messages
26
Hi

Please tell me how I can get my option group in the form to display original data in my tables and queries instead of the numbers (codes).

Thanks
Sandro
 
You may need to explain what you need a little better. You say you have data in a field that is some type of code and you want to convert the codes to display with option group radio buttons? So if your code is 'x' then you want option button 1 selected, if the code is 'y' then you want option button 2 selected, etc. ?
 
Hi Ken

I have in my option group 11 health districts with checkboxes. 1 district is chosen per captured record. In the tables and queries, the districts are stored as numbers (1 to 11), but I want the actual district names to be reflected.

Thanks!
Sandro
 
Hum...

How about this - In the forms 'OnCurrent' event you do the follwoing steps:

1. Turn all of the option buttons off
2. Using a select statement turn the appropriate option button on based on the value of the health district code.

???
 
option groups

Ok, I'm lost now. How can I learn quickly about events, procedures and select statements? :o
 
Try looking at this.

fyi: This is kind of above and beyond, you should really get a good MS Access book :)
 

Attachments

option groups

That's my next step...tell me lastly Ken, will Access 2003 Bible be a good resource for my purposes now?...and thanks for your time!
 
It looks like a good one although I've haven't actually seen it. I usually go by a book store and look 'till I find one I like then buy a 'used' one through amazon.

I didn't mean to be rude and please feel free to ask as many questions as you like. I just think you'll get a bit frustrated trying to pick up the basics of this type through a forum - :)
 
Option groups

You're absolutely right. The forum is very useful but has its limitations. I have played around with some code. Can you tell me what's wrong with the code below...its designed to make a subsequent field disappear after update. The code has worked for me in one d/base but is not working in another! :)

Private Sub Cadre_AfterUpdate()
If Cadre.Column(0) = Primary Health Care Nurse Then
Number Assistive Devices dispensed.Locked = True
Number Assistive Devices dispensed.TabStop = False
Number Assistive Devices dispensed.Visible = False
Else
Number Assistive Devices dispensed.Locked = False
Number Assistive Devices dispensed.TabStop = True
Number Assistive Devices dispensed.Visible = True
End If
End Sub
 
Here's a quick stab at it:

If Cadre.Column(0) = "Primary Health Care Nurse" Then

???
 
option groups

Tried that...I then get the Number assistive devices.. highlighted with this error message: Compile error: Syntax error
 
Oh, didn't even see that...

me.[Number Assistive Devices dispensed].Locked = True

???
 
Option groups

We have a winner!!:D

Bit weird though...in the other d/base, I didn't use brackets of any kind and it worked!

Thanks Ken!
 

Users who are viewing this thread

Back
Top Bottom