FindFirst - What am I doing wrong?

AndyWilcock

New member
Local time
Today, 04:23
Joined
Nov 19, 2020
Messages
11
Set rstGroups = dbs.OpenRecordset(Name:="Group_T", Type:=RecordsetTypeEnum.dbOpenDynaset)

MsgBox Me.Group ' This shows 340 on the screen which is the group i want from rstGroups
rstGroups.FindFirst "GrpID = Me.Group" ' But this line finds the first group in the rstGroups table - grrrrr

so why......

MsgBox Me.Group ' This shows 340 on the screen which is the right Record i want from rstGroups
rstGroups.FindFirst "GrpID = 340" ' finds the correct Record

What am I doing wrong?
 
Hi. Welcome to AWF!

Try:
Code:
rstGroups.FindFirst "GrpID=" & Me.Group
Hope that helps...
 
Code:
"GrpID = " & Me.Group
 

Users who are viewing this thread

Back
Top Bottom