Reputation: 0 Apprentice
- New Members
- Active Posts:
- 7 (0.01 per day)
- 15-July 12
- Profile Views:
- Last Active:
- Apr 04 2013 07:49 AM
- Dream Kudos:
Posts I've Made
Posted 3 Apr 2013Hi,
Thanks for responding.
Can you tell me what is wrong with my statement?
Posted 24 Oct 2012Hello everyone.
I think I found a simpler way to send option button value to an access field. It's through the use of a label as handler of the option button's value which is in "true" state(clicked option button). Then the label control will issue that value it received from the option button to the database with the use of of Data or ADO control.
Here's the sample code:
Private Sub Command1_Click() If Option1.Value = True Then genderLbl = "Male" ElseIf Option2.Value = True Then genderLbl = "Female" End If Data1.Recordset.Update End Sub Private Sub Command2_Click() Data1.Recordset.Edit End Sub
With this code, you no longer need to worry about building a connection between the option buttons and the database. I suspect though that this may tend to be a little slower since your option button does not communicate directly to the database. But it works just fine.
Hope this is helpful to beginners like me.
Posted 24 Oct 2012Yes bob, you're right. stating the error line should be helpful. This is my first post, so that should be a good point to learn. I appreciate that as well as your time with this post.
Anyway, establishing the ADO connection is really my problem. I'll go and check your reference to try to learn it. I'll be back here if I solve the problem.
Posted 23 Oct 2012Maybe I need statement/s that would connect my Option buttons to the database, cause it's not bind to the ADO control. And perhaps some initializations.
It's what I learned so far from readings several forums.
Can anybody help me on this?
Any idea is welcome.
Posted 23 Oct 2012The line after the IF statement generates error.
myRS.Fields!Gender = "Male"
myRS.Fields!Gender = "Female"
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
madujr hasn't added any friends yet.