Uneditable ComboBox, should be according to settings

Zerothi

Registered User.
Local time
Today, 04:22
Joined
Mar 17, 2008
Messages
14
Hi all, I think it's best to submit my file.

in the form "frmRoom" there is two Comboboxes (up in the top, above the subForm) containing table look-up from "tblRoom".
Now I have no idea why they are not editable..
I have tried replacing them with other Comboboxes, with no help.

Any help would be appreciated...
 

Attachments

The RecordSource of the Form is not updateable. The two tables are not joined.
 
I ain't that used to access

Please, how do I then join the tables. I have tried relationships, but that didn't work...

Hope you can help! ;)
 
I don't understand what the form is trying to accomplish; probably because of the language difference. How are the two tables related? Do you need both of them in the RecordSource of your form?
 
Yes that is what i need, the dropdowns should act as searchmethods.
In the vba-section i have a macro that sets the sql of the query so the right information is fetched.

The two drop-downs fetches data from two different tables, i should then be able to select items in the drop down so that there can be an altering in the sql of the query-table.

Roughly I want to make three comboboxes with data from three different tables.
 
I'm sorry but I can not help you here. My understanding is too limited.
 
Well thanks for your try :)

Any other having suggestions?
 
The form is " allow edits" = no

Form settings over-rule textbox/combobox settings.
 
Sry that isn't the problem, try yourself... If you change it to Allow Edits = Yes, then nothing happens, it is still not possible to change the combobox's value.

As far as I know the Allow edits only determines whether you can modify currently accesible records. <- Nothing to do about the locked ability.

Thanks. Any other suggestions?
 
So it is not... hmz...

Your rowsource for the combo is:
SELECT qryRoomCriteria.strRoomName, qryRoomCriteria.intRoom, qryRoomCriteria.strShaft, qryRoomCriteria.dblHeat, qryRoomCriteria.dblCool, qryRoomCriteria.dblUsedWater, qryRoomCriteria.dblVentilation, qryRoomCriteria.strAptitude FROM qryRoomCriteria;

While in qryRoomCriteria you have
SELECT tblRoom.strRoomName, tblRoom.intRoom, tblRoom.dblHeat, tblRoom.dblCool, tblRoom.dblUsedWater, tblRoom.dblVentilation, tblRoom.strAptitude, tblRoom.strShaft
FROM tblRoom
WHERE (((tblRoom.strAptitude)='Anlæg 1') AND ((tblRoom.strShaft)='Skakt 1'))
ORDER BY tblRoom.strRoomName;

Seeing as both combo boxes are based on this query and both are set to "limit to list" you cannot select anything that is not in above query.... :D
 
The first SQL-code is the RowSource for the Subform, sbfrmRoom.
But it's the combobox from the parent form that i can't get working. That is the comboboxes:
'ctrShaftSort' and 'ctrAptitudeSort' by name.

And their RowSource, respectively:
SELECT strShaftName FROM tblShaftNames;
&
SELECT strAptitudeName FROM tblAptitudeNames ORDER BY strAptitudeName;

And as they are gathering their data from another table, i can't see why it's not working...

As far as i see, there isn't anything thats preventing me from doing this, or is there?

Thanks for the help!
 
Yes there is

Your rowsource for the combo is:
SELECT qryRoomCriteria.strRoomName, qryRoomCriteria.intRoom, qryRoomCriteria.strShaft, qryRoomCriteria.dblHeat, qryRoomCriteria.dblCool, qryRoomCriteria.dblUsedWater, qryRoomCriteria.dblVentilation, qryRoomCriteria.strAptitude FROM qryRoomCriteria;

While in qryRoomCriteria you have
SELECT tblRoom.strRoomName, tblRoom.intRoom, tblRoom.dblHeat, tblRoom.dblCool, tblRoom.dblUsedWater, tblRoom.dblVentilation, tblRoom.strAptitude, tblRoom.strShaft
FROM tblRoom
WHERE (((tblRoom.strAptitude)='Anlæg 1') AND ((tblRoom.strShaft)='Skakt 1'))
ORDER BY tblRoom.strRoomName;

Seeing as both combo boxes are based on this query and both are set to "limit to list" you cannot select anything that is not in above query.... :D

The query will only return 'Anlæg 1' and the combobox is "limit to list" i.e. cannot select anything else than it returns....
 
I am not quite sure what you mean... Does the subForms RowSource has anything to do with the ComboBox-control in the parent form?

The RowSource you posted are not to be found in the form 'frmRoom'. But in the form sbfrmRoom.

None of the Combo-boxes are based on that query, qryRoomCriteria, but on the table tblShaftNames

The first SQL-code is the RowSource for the Subform, sbfrmRoom.
But it's the combobox from the parent form that i can't get working. That is the comboboxes:
'ctrShaftSort' and 'ctrAptitudeSort' by name.

And their RowSource, respectively:
SELECT strShaftName FROM tblShaftNames;
&
SELECT strAptitudeName FROM tblAptitudeNames ORDER BY strAptitudeName;

Even if I choose 'Limit to List=false' it doesn't work. I can't select anything of the comboboxes items...

If you have got it working please upload, so I can see.

Thanks
 
You've got other problems in all this, I think, but your combobox problem is that Allow Edits = No and your combobox is bound to a field in your table/query. Comboboxes used for searching/retrieving records like this have to be unbound! For a start, change Allow Edits to Yes and remove the ControlSource from each of your combobxes. Then you can start addressing the question of getting your SQL straight to actually pull the records.
 
Last edited:
You have a cartagian product as the rowsource for the form where you are using the fields to be the source of the fields.
Cartagian products and Group by queries are never updatable, no matter what the settings of your form.

0) Forget my previous comment(s)

1) Remove rowsource
I agree with MissingLinq, these comboboxes are probably meant to be lookup things. Therefor should be unbound

2) Set the form to editable.
 
Many thanks!!!! I am very much obliged of your professional help!!!

It is now working, if anybody needs the finished file, plz write me and i will supply the file!!! It seems as if i cannot upload... :=)
 

Users who are viewing this thread

Back
Top Bottom