Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / October 2007

Tip: Looking for answers? Try searching our database.

GoToRecord 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MUSIWA - 02 Oct 2007 15:38 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.