KevinSlater
Registered User.
- Local time
- Today, 13:20
- Joined
- Aug 5, 2005
- Messages
- 249
Hello all, I have a cascading combo box that works fine, however I would like the “STK_PART_CODE_DESCRIPTION” field (product description) to be displayed in the combo list to the user also, because the user doesn’t always know what the product is just by the code.
The field ““STK_PART_CODE_DESCRIPTION” is in the query: “SCREEN_ADD_PRODUCT” (The combo box looks at this query).
Below shows what code I currently have that works
Private Sub CBO_SAL_ACCOUNT_AfterUpdate()
On Error Resume Next
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE " & _
"FROM SCREEN_ADD_PRODUCT " & _
"WHERE SCREEN_ADD_PRODUCT.SAL_ACCOUNT = '" & CBO_SAL_ACCOUNT.Value & "' " & _
"ORDER BY SCREEN_ADD_PRODUCT.STK_PART_CODE;"
End Sub
From this code Ive tried modifying the select clause to the following below amongst others but had no luck so far, Access usually says theirs missing syntax!? (but im not sure what im missing?)
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE " & _ ““STK_PART_CODE_DESCRIPTION ” &_
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE " & “-“ “STK_PART_CODE_DESCRIPTION” &_
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE , STK_PART_CODE_DESCRIPTION ” &_
Any suggestions on how I can fix this would be excellent, thanks kevin.
The field ““STK_PART_CODE_DESCRIPTION” is in the query: “SCREEN_ADD_PRODUCT” (The combo box looks at this query).
Below shows what code I currently have that works
Private Sub CBO_SAL_ACCOUNT_AfterUpdate()
On Error Resume Next
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE " & _
"FROM SCREEN_ADD_PRODUCT " & _
"WHERE SCREEN_ADD_PRODUCT.SAL_ACCOUNT = '" & CBO_SAL_ACCOUNT.Value & "' " & _
"ORDER BY SCREEN_ADD_PRODUCT.STK_PART_CODE;"
End Sub
From this code Ive tried modifying the select clause to the following below amongst others but had no luck so far, Access usually says theirs missing syntax!? (but im not sure what im missing?)
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE " & _ ““STK_PART_CODE_DESCRIPTION ” &_
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE " & “-“ “STK_PART_CODE_DESCRIPTION” &_
CBO_PART_CODE.RowSource = "Select DISTINCT SCREEN_ADD_PRODUCT.STK_PART_CODE , STK_PART_CODE_DESCRIPTION ” &_
Any suggestions on how I can fix this would be excellent, thanks kevin.
Last edited: