i did all that as you said..but once again..is being the same...would it be possble if i send you the file so you look at it?
need help with cascading combo/list boxes
Collapse
X
-
I can't open your file, it says unrecognized database format.
Just answer these two questions and I should be able to fix the problem.
I also need to know the values for "and i put in all the control source and row source and column count a you stated"
I also need to know what the form is bound to, if anything, and the fields of that table if different from the two you have described.Comment
-
is probaly cause is access 2007
okay
here is the information...
for cpyname
name: cpyname
controlsource: cpyname
colum count: 2
colum width: 1
rowsource: tblcompany
rowsource type: table/query
bound colum: 2
for empname
name: empname
controlsource: empname
colum count: 1
colum width: N/A
rowsource:
rowsource type: table/query
bound colum: 2
i will try sending you the db in access 97-2003 formatComment
-
1) Your form's record source uses a join. Joins are not updateable. As your form is setup now, there's no need for the form at all. The whole purpose of having the 2 lookup tables and cascading combo boxes is to populate the fields of a third table. Not to populate themselves.
2) The settings should be
name: cpyname (This should probably be CompanyID)
controlsource: (Whatever field you want to save this to, a third table, not your lookup tables, that defeats the purpose of cascading combo boxes)
colum count: 2
colum width: 0
rowsource: tblcompany
rowsource type: table/query
bound colum: 1
name: empname (This should probably be EmployeeID)
controlsource: (See Above)
colum count: 2
colum width: 0
rowsource:
rowsource type: table/query
bound colum: 1
3) The Code
Code:Private Sub cpyname_AfterUpdate() With Me![empname] If IsNull(Me!cpyname) Then .RowSource = "" Else .RowSource = "select id, [empname] " & _ "from tblemployees " & _ "where [id] =" & Me!cpyname End If Call .Requery End With End SubComment
-
okay i finally got your tutorial to work.
okay but now...this is what i am want to do for school project.
I have to set up this cascadog combo/list boxs
basically
they way you would say it english would be like this
if value in combobox1 is Available (combo box choices are available, on project, vacatio)
then search the table1 for anyone with Available status and list them in combobox.
thats how it should be done....if not possible what is my choice.Comment
-
You can do this with the cascading combo boxes. The first combo box holds the status values. The second combo box's row source is changed accordingly in the after update event of the first combo box. It's no different than a cascading combo box save for the exact syntax you use. But the concept is the same.Originally posted by poujokay i finally got your tutorial to work.
okay but now...this is what i am want to do for school project.
I have to set up this cascadog combo/list boxs
basically
they way you would say it english would be like this
if value in combobox1 is Available (combo box choices are available, on project, vacatio)
then search the table1 for anyone with Available status and list them in combobox.
thats how it should be done....if not possible what is my choice.Comment
Comment