Hi Grant,
You need to add code to the after update event for cbostock similar to the following:
Private Sub cboStockType_AfterUpdate()
Dim strSQL As String
strSQL = "SELECT StockID, Stock from tbl_Stock where StockTypeID = " & Me.cboStockType
Me.cboStock.RowSource = strSQL
End Sub
Darrell
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of beinkeboy
Sent: Thursday, June 20, 2013 1:24 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Help Please - Linked Combo Boxes on a Datasheet sub form
Hi,
I have two combo boxes on a datasheet sub form that I can not get to work.
I want the cboStock to update to show the relevant Stock when the cboStockType is changed.
I can get it to half work but when I move to the next row in the datasheet it goes all wrong.
I have stripped the database of all my bad efforts and excess tables and uploaded it to Files\2 Assistance\ComboBoxes on Subform.mdb.
If you load the frmEvent you will see what I am trying to do.
Any assistance would be greatly appreciated.
Thank you
Grant
The information contained in this communication is highly confidential and is intended solely for the use of the individual(s) to whom this communication is directed. If you are not the intended recipient, you are hereby notified that any viewing, copying, disclosure or distribution of this information is prohibited. Please notify the sender, by electronic mail or telephone, of any unintended receipt and delete the original message without making any copies.
Blue Cross Blue Shield of Michigan and Blue Care Network of Michigan are nonprofit corporations and independent licensees of the Blue Cross and Blue Shield Association.
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar