Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

binding option button controls on unbound forms

Status
Not open for further replies.

dabruins

Programmer
Mar 9, 2005
102
CA
I am using an MS Access 2002 as a Frontend to a MYSQL 5.0.18 database server backend. I am attempting to set up unbound forms using a dsn-less ADO connection. I have been able to bind the textbox and combobox controls to the fields within my form however I am having difficulties binding boolean field types to my option button controls.

1) Has anyone had any success in binding option button controls to MySQL boolean fields?

2) On another point, in the unbound forms do you set up your own navigation controls or are you able to utilize the standard form navigation controls provided by Access. Again it seems the option button controls do not stay synchronized to the current record.

3) Also after creating a recordset and binding it to my form and binding the controls, I close the recordset and the connection object. After making changes to a current record, if I navigate to the next record in the recordset any changes I made in the previous record are automatcially reflected in the MYSQL tables. The user is not prompted to save changes; it does it automatically. I'm new to using ADO and was surprised to see that this was possible since the connection object had been closed. Can anyone explain this? How do you go about preventing the direct writing to MySQL without informing the user that they are doing so? Where is the code for the navigation buttons events? Is it possible to 'hook' into them?

Sorry for the longwinded post but I'm really struggling with this over the past week or so and am not making much headway.

Thanks.
 
I found a post in this site that showed a method of binding controls that doesn't set the controlsource of the control but rather sets the the field value of the current record to the control directly, not its controlsource.

See
In that case: mycontrol = rst.fields(mycontrol.name)
as opposed to: mycontrol.controlsource = rst.fields(mycontrol.name)

This only permits the viewing of a single record from a table within the form. I am hoping to permit scrolling to another record in the form recordset. Is this possible? maybe I am going about this the wrong way?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top