A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form - open blank



 
 
Thread Tools Display Modes
  #1  
Old September 28th, 2006, 04:01 PM posted to microsoft.public.access.forms
Matt Dawson
external usenet poster
 
Posts: 169
Default 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  
Old September 28th, 2006, 04:20 PM posted to microsoft.public.access.forms
Al Campagna
external usenet poster
 
Posts: 421
Default 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  
Old September 28th, 2006, 04:43 PM posted to microsoft.public.access.forms
Matt Dawson
external usenet poster
 
Posts: 169
Default 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  
Old September 28th, 2006, 07:44 PM posted to microsoft.public.access.forms
Al Campagna
external usenet poster
 
Posts: 421
Default 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  
Old September 29th, 2006, 01:56 PM posted to microsoft.public.access.forms
Matt Dawson
external usenet poster
 
Posts: 169
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.