option buttons from vb form to Access table

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

macataq

Thread Starter
Joined
Aug 4, 2002
Messages
181
hi
i need to get which option buttons are selected on my vb6 form to a table in my Access db . i already have an ADO connection to populate the vb form from an Acces table, what i need to do now is capture that form that is filled out in a different table. any ideas , suggestions or tips would be appreciated

Thnx
[email protected]
 

macataq

Thread Starter
Joined
Aug 4, 2002
Messages
181
yes i have a yes/no column in an access table for each option button in my vb6 form
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Create a form for the table that you want the values to be stored in.
When you open your form that has the option buttons on, also open the new form but in "Invisible" mode. As the user makes their choices there should be a piece of VB code in the After Update Event Procedure for each set of option buttons that sets the value in the "Invisible form's corresponding field to the value chosen. Does your "Yes/No" Column have a "Tick box" or the words "Yes" and "No"?
 

macataq

Thread Starter
Joined
Aug 4, 2002
Messages
181
i am not sure i follow what you are saying. i need the data to be placed in an existing Access table not placed in another form. and my fields contain tick boxes

Thanx
Mac
 
Joined
Oct 2, 2001
Messages
1,227
If you are trying to populate a yes/no (boolean) field in an access table, I would suggest you use a check box rather than an option button in VB6 to populate the record in that field.
 

macataq

Thread Starter
Joined
Aug 4, 2002
Messages
181
hi Wolfworx, thanx for the response

i had thought about doing that but i have these option buttons inside a frame so that only 1 of them can be selected per row (17 rows), is there a way to do that with checkboxes?

thanx again
Mac
 
Joined
Oct 2, 2001
Messages
1,227
17 Rows?? Do you mean 17 records in a table, each with a yes/no field but only one record can be "yes"?
 

macataq

Thread Starter
Joined
Aug 4, 2002
Messages
181
hello again
no, i have 17 rows of labels with option buttons on my form
like this

optbtn1 label1 label2 optbtn2
optbtn3 label3 label4 optbtn4
.........
optbtn33 label33 label34 optbtn34

what the label says doesnt matter, i just need to collect which option button or check box was selected and record that in an access table
thanx
Mac
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Mac, can you post one with a couple of the records from the main table as well please?
I will write some code for you?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top