Hi There,
I've got a problem with cascading combo boxes. First some background:
I am using Access 2003 to write a little helpdesk app.
I have a Table and form (tbl and frm Helpdesklog) which lists the bulk of the users details plus descriptions of the various requests. I have a second table (tblAssets) that contains asset information. And a third table called tblUsers which I am using to link the two.
Here's the problem:
cboUser looks up an ID and username.
In cboUser 1 I have placed the code
In the AfterUpdate property - yet the query doesn't appear to be requerying. Can someone point out where I am going wrong?
My second combo box (cboTag) matches the User field with the entry for Primary User in tblAssets and displays the value of Tag (it's the number assigned to the equipemt).
Here's the SQL for cboTag:
The problem I have is that no matter what I do, the values in cboTag only change once per loaded form. In order to get them to change I have to close and reopen the form.
By the way I didn't name the tables and I fid the naming convention confusing (they are frequently named after the form controls) - I've attempted to tidy this up for you.
I've got a problem with cascading combo boxes. First some background:
I am using Access 2003 to write a little helpdesk app.
I have a Table and form (tbl and frm Helpdesklog) which lists the bulk of the users details plus descriptions of the various requests. I have a second table (tblAssets) that contains asset information. And a third table called tblUsers which I am using to link the two.
Here's the problem:
cboUser looks up an ID and username.
Code:
tblUsers
--------
UserID User
1 user1
2 user2
Sql for combo box:
SELECT tblUsers.UserID, tblUsers.User
FROM tblUsers
ORDER BY tblUsers.User;
In cboUser 1 I have placed the code
Code:
me.cboUSer.ReQuery
In the AfterUpdate property - yet the query doesn't appear to be requerying. Can someone point out where I am going wrong?
My second combo box (cboTag) matches the User field with the entry for Primary User in tblAssets and displays the value of Tag (it's the number assigned to the equipemt).
Here's the SQL for cboTag:
Code:
SELECT DISTINCT tblAssets.Tag, tblAssets.Type FROM tblAssets INNER JOIN (tblHelpDeskLog INNER JOIN tblUsers ON tblHelpDeskLog.User = tblUsers.UserID) ON tblAssets.[Primary User] = tblUsers.User WHERE (((tblHelpDeskLog.User)=[Forms]![frmHelpDeskLog]![cboUser]));
The problem I have is that no matter what I do, the values in cboTag only change once per loaded form. In order to get them to change I have to close and reopen the form.
By the way I didn't name the tables and I fid the naming convention confusing (they are frequently named after the form controls) - I've attempted to tidy this up for you.