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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing Data Control Bound To Dropdown Lists

Status
Not open for further replies.

BenSC

Technical User
Jul 24, 2001
43
GB
Dear All,
I have a form which allows users to select a database file to add\edit data in.
Once the user has selected the database, code runs to set the DatabaseName of a data control on the form to equal the chosen database path\name. I've found that once the path of the data control is set, it needs to be refreshed before it picks up the record(s) in the database.
I've found that the code I've written to do this works fine except for tables that have a dropdown list as one of their fields.
For the dropdown list tables the error "Text property is read only" occurs. I've tried trapping it, but this doesn't work.
However, this error doesn't occur when there are already records in the table.

I'm using the code:

me.[DataControl].DatabaseName = [Selected Database Path & Name]
me.[DataControl].Refresh

If anyone could help me with this I'd be most grateful.

Thanks in advance
Ben Cooper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top