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
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