DataSheet New Record Error

flavioso

Registered User.
Local time
Yesterday, 22:19
Joined
Jan 21, 2008
Messages
16
Hello friends.


Please see the image below. I have this datasheet attached to the main record by the DOCKETID. The actual record ID for the data in the datasheet is SUBDOCKETID. Whenever I add a new line into the datasheet for the given master record, it populates the data with the previous line, so no new data is allowed. The Part Number is a combo box based on the Vendor. Here is my code for cascading combo box. Would anyone have any suggestions as to why the data repeats on every line? If I change the part number, the data below changes as well. Is there something I can add so it doesn't repeat?

I appreciate any help or suggestions.

Brad

Code:
Private Sub cboVENDOR_AfterUpdate()

    Me.cboPN2.RowSource = "SELECT fldPN, fldDESCRIPTION, fldMEASURE FROM" & _
                               " tblPARTS WHERE fldVENDORID = " & _
                               Me.cboVENDOR.Column(0) & _
                               " ORDER BY fldPN"
                            
    Me.cboPN2.Requery
End Sub

prob2.jpg
 
A cascading combo on a datasheet is not really workable. If you look at your subform in design view there is really only the one PartNumber combo, so when you change its rowsource it changes for ALL INSTANCES of that single control. If the new rowsource doesn't include a part number that might exist in other records for other vendors then those data disapper--they don't exist in the combo's new rowsource--and the controls show blank.
Though the data are not harmed by this, it will always be a confusing situation for your users.
 

Users who are viewing this thread

Back
Top Bottom