Binding an SQL Server column from a 1-record table to an Access form control

  • Thread starter Niels Reinholdt
  • Start date
N

Niels Reinholdt

Hello all:

I have an SQL Server database where Access is just one way to connect
to it. To save global application settings for SQL's database I am
creating a one-record SQL table with appropriate field names, table
appOptions.

Can I set up an Access form with (e.g.) a textbox control txtFoo to
read and write (e.g.) appOptions.intConversionFactor? Methods tried:

1) Retrieve the value of intConversionFactor on Form Load and use it
to set txtFoo's ControlSource. Then use txtFoo's "On Exit" to save the
new value to the SQL table. Problem: this is assigning a constant
value to the textbox, and so users cannot edit it.

2) Assign txtFoo's ControlSource to a property I wrote, pConvFactor.
Unfortunately, in testing my "Property Let" code is not executed - the
form doesn't seem to recognize that it should reference a property -
so the current value is never displayed on the form.

Any help would be appreciated. Thanks,

Niels Reinholdt
Edmonton, Alberta
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top