Probs. in Storing Option Button Values in Table

DavidCdp1

Registered User.
Local time
Today, 16:24
Joined
Dec 13, 2004
Messages
27
Hi Everyone,

I have a form that shows data from a table. Along with text boxes, there are 4 option buttons for 'Marital Status'. The caption of the option buttons are 'Mr.', Mrs', 'Miss', 'Single'. When I save the data from form, it is saving the value of 'Marital Status' as 1,2, 3....
How can I update the table with values 'Mr.', Mrs', 'Miss', 'Single' rather than 1,2,3 ....

Please help.
Thanks in Advance.
DavidCdp1.
 
David,

You could do the following :

Make the option group unbound.
Create a textbox on your form and set it's visible property to NO. and bound it to the field in the table.
Then on the AfterUpdate event of the option group put the following :

Code:
Select Case Me.OptiongroupName
Case 1
me.textboxname = "Mr"
Case 2
me.textboxname = "Mrs"
Case 3
me.textboxname = "Miss"
Case 4
me.textboxname = "Single"
End Select

HTH
Andy
 
s help....

Andy Thanks for that.
Really useful.
Now I am able to update the table with the data I wish.

But when I navigate the form with default navigation tool, there are no changes in the option buttons selection. Can you please help.

Thanks.
DavidCdp1.
Pl
 
David,

Put the following code on the Form's AfterInsert Event:


Code:
Frame4.defaultvalue = ""

Frame4 is the name of the option group.

This should do the trick.

Andy
 

Users who are viewing this thread

Back
Top Bottom