wlwebb
asked on
Update subform after selection on Main Form
Hi everyone
I am attempting to update a subform after the user selects an item from a list on a mainform
I get an error.
The offending line of code is
strCriteria = "[GLDataName] = " & Chr(34) [Me.lstJobCostSummaryJobSe lector] & chr(34)
Anyone see what the problem is?
I am attempting to update a subform after the user selects an item from a list on a mainform
I get an error.
The offending line of code is
strCriteria = "[GLDataName] = " & Chr(34) [Me.lstJobCostSummaryJobSe
Anyone see what the problem is?
Private Sub lstJobCostSummaryJobSelector_AfterUpdate()
Dim rs As Recordset
Dim rsAdd As Recordset
Dim strCriteria As String
strCriteria = "[GLDataName] = " & Chr(34) [Me.lstJobCostSummaryJobSelector] & chr(34)
Me.Requery
Set rs = Me.RecordsetClone
rs.MoveLast
rs.FindLast strCriteria
Me.Bookmark = rs.Bookmark
Me.txtGLDataName = Me.lstJobCostSummaryJobSelector
Me.txtJob = Me.lstJobCostSummaryJobSelector
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Als315, that was it. Also had to get rid of the [] on the Me. part of the statement
strCriteria = "[GLDataName] = " & Chr(34) [Me.lstJobCostSummaryJobSe
should be something like:
strCriteria = "[GLDataName] = " & Chr(34) & [Me.lstJobCostSummaryJobSe
We don't use Chr(34). You can get the same result by stacking quotes:
strCriteria = "[GLDataName] = """ & [Me.lstJobCostSummaryJobSe
Cheers,
Armen