Hello Everyone,
I have a sub-form in datasheet view with several records, the first two characters of each record make up a product code, that is then copied to a field on the parent form. I can split the first two characters from the first record. I've tried everything I can think of to loop through, but I'm missing something. I get the first two letters of the first line X the number of lines. I get "PM X 4" PMPMPMPM
Any help would greatly appreciated. Thank you
I have a sub-form in datasheet view with several records, the first two characters of each record make up a product code, that is then copied to a field on the parent form. I can split the first two characters from the first record. I've tried everything I can think of to loop through, but I'm missing something. I get the first two letters of the first line X the number of lines. I get "PM X 4" PMPMPMPM
Code:
Private Sub Command84_Click()
Dim rst As DAO.Recordset
Dim sTmp As String
Set rst = Me.[PanelBuild].Form.RecordsetClone
With rst
Do Until .EOF
sTmp = sTmp & Left([Forms]![panelbuilder]![PanelBuild]![subCode], 2)
.MoveNext
Loop
End With
rst.Close
Set rst = Nothing
Me.Text82 = sTmp
End Sub
Any help would greatly appreciated. Thank you
Attachments
Last edited: