A
ajbarilla
I am having problems trying to populate textboxes in a form from a
table. I have a form with textboxes labeled Text1, Text2, Text3....
I get an error on the "Me.[TextNo] = ![FieldName]" line
I have verified the TextNo and FieldName variables contain the correct
data so I assume its a syntax error.
Any help would be apprciated.
For I = 1 To 50
Set rst = db.OpenRecordset("SELECT * FROM tblFieldKey WHERE
tblFieldKey.ID = " & I)
With rst
FieldName = !field
End With
Set rstedit2 = db.OpenRecordset("SELECT * FROM " & "qryDealerdata
WHERE [PDN] = " & searchcrit)
With rstedit2
TextNo = "Text" & I
Me.[TextNo] = ![FieldName]
End With
Next I
table. I have a form with textboxes labeled Text1, Text2, Text3....
I get an error on the "Me.[TextNo] = ![FieldName]" line
I have verified the TextNo and FieldName variables contain the correct
data so I assume its a syntax error.
Any help would be apprciated.
For I = 1 To 50
Set rst = db.OpenRecordset("SELECT * FROM tblFieldKey WHERE
tblFieldKey.ID = " & I)
With rst
FieldName = !field
End With
Set rstedit2 = db.OpenRecordset("SELECT * FROM " & "qryDealerdata
WHERE [PDN] = " & searchcrit)
With rstedit2
TextNo = "Text" & I
Me.[TextNo] = ![FieldName]
End With
Next I