-
Unbound textbox Issue on Tabular Form
My tabular form has a Part# associated with the table the form connects with. In the change method of the Part# field, I have a DAO.Recordset that is fetching the Part Description and am trying to place that description on the same line for that specific Part# field that is being changed. However, what is happening is all of the Part Description fields for the entire form is being changed.
Is there a way to identify only the active row for the tablular form?
Here is my code: I believe the problem lies where I have the Me!txtPartDescription = rs!partdes. I envision something here specifying what line (a bookmark or something) to alter with the part description.
Any suggestions?
Private Sub cboPartNum_change()
Dim rs As DAO.Recordset
Dim strRecords As String
strRecords = "SELECT [PARTDES] FROM tPART# WHERE [PARTNUM] = '" & Me!cboPartNum & "'"
Set rs = CurrentDb().OpenRecordset(strRecords, dbOpenDynaset)
Me!txtPartDescription = rs!partdes
rs.Close
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|