Hello!
I have a question I've been working on for a few days now and I can't find a solution. I hope there is someone that has the answer :)
I'm using Access 2003 in win XP. I have a main form called "MulitLineView" , that has a subform called "subLinelistVie w". In the main form's "Form_Open" event I use a query to open the contents of a table for editing in the subform in datasheet mode like this:
This all works fine, the subform shows the proper fields. I'm also applying locks to fields (using a combobox which I hide) with:
This works fine too.
My question is: How can I make it so that for some columns, the values which can be entered in the field are limited by a combobox?
The rowsources for the comboboxes should be queries which I want to provide in the code for each column. I've been trying to find the right control property, I tried things like:
and
but in runtime I always get an error msg saying the object doesn't have that property.
Can anyone help me pull this off? Any help is greatly appreciated! :)
I have a question I've been working on for a few days now and I can't find a solution. I hope there is someone that has the answer :)
I'm using Access 2003 in win XP. I have a main form called "MulitLineView" , that has a subform called "subLinelistVie w". In the main form's "Form_Open" event I use a query to open the contents of a table for editing in the subform in datasheet mode like this:
Code:
Set qdf = db.CreateQueryDef(strQueryName, strQuery) subLinelistView.SourceObject = "Query." & strQueryName
Code:
Forms("MultiLineView").Controls("subLinelistView").Form.Controls(cmbMayNotEdit.Column(0, intCounter)).Properties("Locked") = True
My question is: How can I make it so that for some columns, the values which can be entered in the field are limited by a combobox?
The rowsources for the comboboxes should be queries which I want to provide in the code for each column. I've been trying to find the right control property, I tried things like:
Code:
strQuery = "SELECT plant_abbr FROM Plants"
Forms("MultiLineView").Controls("subLinelistView").Form.Controls("Plant_abbr").RowSource = strQuery
Code:
Forms("MultiLineView").Controls("subLinelistView").Form.Controls("Plant_abbr").Properties("RowSource") = strQuery
Can anyone help me pull this off? Any help is greatly appreciated! :)
Comment