If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Form - open blank
Working in Access 2003.
When I open a form, it automatically opens with the first record. Is there anyway of making the form open with a blank record so that users cannot see this! Thanks, Matt |
#2
|
|||
|
|||
Form - open blank
Matt,
To open just to a new record... DoCmd.OpenForm "YourForm" DoCmd.GoToRecord , , acNewRec To Open a form so that only New Records can be added and users can't access old records... DoCmd.OpenForm "YourForm" Me.DataEntry = True -- hth Al Campagna Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Matt Dawson" wrote in message ... Working in Access 2003. When I open a form, it automatically opens with the first record. Is there anyway of making the form open with a blank record so that users cannot see this! Thanks, Matt |
#3
|
|||
|
|||
Form - open blank
Cheers mate but where do i type this/
In the open form procedure? "Matt Dawson" wrote: Working in Access 2003. When I open a form, it automatically opens with the first record. Is there anyway of making the form open with a blank record so that users cannot see this! Thanks, Matt |
#4
|
|||
|
|||
Form - open blank
Matt,
Not a big deal, but please don't delete the previous posts on the thread. That way folks can always see the "flow" of the problem, without having to look back at the previous posts. From a button... My code was meant to be placed behind a button's OnClick Event Procedure. Most apps have a "main menu" type form with buttons where users have multiple choices as to opening forms, or opening reports, queries, etc.. If you use macros instead of VBA, you could use the same process as my code to open the form and goto a new record. That macro would be assigned to the OnClick event of button also. ** If you have "users" this should be the way the form opens. Users should be kept away from the Access Database Window. Via the Form itself... If you are just opening the form by Dbl-clicking the file from the Access screen... then in that form's OnLoad event, using VBA... Private Sub Form_Load() DoCmd.GoToRecord , , acNewRec End Sub or, a macro that would do the same. -- hth Al Campagna Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Matt Dawson" wrote in message ... Cheers mate but where do i type this/ In the open form procedure? "Matt Dawson" wrote: Working in Access 2003. When I open a form, it automatically opens with the first record. Is there anyway of making the form open with a blank record so that users cannot see this! Thanks, Matt |
#5
|
|||
|
|||
Form - open blank
Cheers mate,
thats brilliant, Sorry about the deletion but thanks for your help Nice one "Al Campagna" wrote: Matt, Not a big deal, but please don't delete the previous posts on the thread. That way folks can always see the "flow" of the problem, without having to look back at the previous posts. From a button... My code was meant to be placed behind a button's OnClick Event Procedure. Most apps have a "main menu" type form with buttons where users have multiple choices as to opening forms, or opening reports, queries, etc.. If you use macros instead of VBA, you could use the same process as my code to open the form and goto a new record. That macro would be assigned to the OnClick event of button also. ** If you have "users" this should be the way the form opens. Users should be kept away from the Access Database Window. Via the Form itself... If you are just opening the form by Dbl-clicking the file from the Access screen... then in that form's OnLoad event, using VBA... Private Sub Form_Load() DoCmd.GoToRecord , , acNewRec End Sub or, a macro that would do the same. -- hth Al Campagna Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "Matt Dawson" wrote in message ... Cheers mate but where do i type this/ In the open form procedure? "Matt Dawson" wrote: Working in Access 2003. When I open a form, it automatically opens with the first record. Is there anyway of making the form open with a blank record so that users cannot see this! Thanks, Matt |
Thread Tools | |
Display Modes | |
|
|