Is there a problem with the gotorecord command in access 2007 ?
I have this code
stTEst = IsNull(Forms(scrF)!ScriptID)
If stTEst Then
DoCmd.Close acForm, scrF
Exit Sub
End If
Forms(scrF).RecordsetClone.MoveLast
zCNT = Forms(scrF).RecordsetClone.RecordCount
DoCmd.OpenForm scrF, acNormal, , strcScript, , acHidden
If zCNT > 0 Then
DoCmd.SelectObject acForm, scrF, True
DoCmd.GoToRecord , scrF, acFirst
sct1 = Forms!strMeds!SIG
zCNT = zCNT - 1
End If
I do this about 4 times I then collect the sct1 thru 4 and use them in a
report. With only 2007 I can not go pass the gotorecord statment. There are
no errors with access 2003 or XP
MUSIWA - 02 Oct 2007 21:15 GMT
OK I asked the question and got no answer so I fixed it my self. I am still
not sure why the code did not work so I wen around it with this one. and lo
and behold it works
Set stScrpt = Forms(scrF).RecordsetClone
zCNT = stScrpt.RecordCount
'MsgBox "My form contains " _
& zCNT _
& " records.", vbInformation, "Record Count"
If zCNT > 0 Then
COUNT = 1 ' used as a test to open script form some where else
stScrpt.MoveFirst
sct1 = stScrpt.Fields.Item("SIG")
'MsgBox sct1
zCNT = zCNT - 1
End If
I am sure there is a catch somewhere but right now my bubble is very big
> Is there a problem with the gotorecord command in access 2007 ?
>
[quoted text clipped - 20 lines]
> report. With only 2007 I can not go pass the gotorecord statment. There are
> no errors with access 2003 or XP