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 / Forms / March 2008

Tip: Looking for answers? Try searching our database.

open form to blank records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
klp - 12 Mar 2008 15:52 GMT
I have looked on the message board for this posting and have found answers.
They are the same answers that I have tried but my solution is not working.

Here is the problem.

I have a form where I want to open up to blank records. These records are
only to viewed, not edited or added. I put this logic    DoCmd.GoToRecord , ,
acNewRec in the OnOpen event and also tried the OnLoad event of the form.
I've also referenced the form frmCustomers in the statement. I get this error
of "Can't go to specified record". What could be causing this error?

Thanks in advanced.

Kim P
Allen Browne - 12 Mar 2008 16:12 GMT
If you don't need to see the old records, just set the form's Data Entry
property to Yes. Of if you open the form programmatically, use:
   DoCmd.OpenForm "Form1", DataMode:=acFormAdd

If you do want to load the old records, but jump to the new record, use:

   Private Sub Form_Load()
       If Not Me.NewRecord Then
           RunCommand acCmdRecordsGotoNew
       End If
   End Sub

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have looked on the message board for this posting and have found answers.
> They are the same answers that I have tried but my solution is not
[quoted text clipped - 9 lines]
> error
> of "Can't go to specified record". What could be causing this error?
klp - 12 Mar 2008 16:46 GMT
Thank you so much!

>If you don't need to see the old records, just set the form's Data Entry
>property to Yes. Of if you open the form programmatically, use:
[quoted text clipped - 13 lines]
>> error
>> of "Can't go to specified record". What could be causing this error?
klp - 12 Mar 2008 16:46 GMT
Thank you so much!

>If you don't need to see the old records, just set the form's Data Entry
>property to Yes. Of if you open the form programmatically, use:
[quoted text clipped - 13 lines]
>> error
>> of "Can't go to specified record". What could be causing this error?
klp - 12 Mar 2008 16:46 GMT
Thank you so much!

>If you don't need to see the old records, just set the form's Data Entry
>property to Yes. Of if you open the form programmatically, use:
[quoted text clipped - 13 lines]
>> error
>> of "Can't go to specified record". What could be causing this error?
 
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.