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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Accessing Tables with VBA code



 
 
Thread Tools Display Modes
  #1  
Old September 14th, 2004, 07:36 PM
Chin Bhat
external usenet poster
 
Posts: n/a
Default Accessing Tables with VBA code

Hi,

I am writing a program with Access using VBA. I have a
table and need to do the following:

- stop Access from automatically creating a new blank
record
- create and jump to a new record (using code)


Thanks a lot for your help in advance, I really
appreciate it.

Chin.

  #2  
Old September 15th, 2004, 01:09 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Tue, 14 Sep 2004 11:36:05 -0700, "Chin Bhat"
wrote:

Hi,

I am writing a program with Access using VBA. I have a
table and need to do the following:

- stop Access from automatically creating a new blank
record
- create and jump to a new record (using code)


Is the user viewing the data on a Form? If so, you can set the Form's
AllowInsert property to False (to keep them from seeing the new
record); in your code you can include a line

DoCmd.GoToRecord acDataForm, "NameOfYourForm", acNewRecord

to go to the new record. (You don't need to create a new record, it's
always there).

John W. Vinson[MVP]
(no longer chatting for now)
  #3  
Old September 15th, 2004, 05:31 AM
Chin Bhat
external usenet poster
 
Posts: n/a
Default

Thanks for your reply. The user is not actually viewing
the records. He/She is just entering information into
the viewer. I actually dont want a new record to just be
there. I want to create it at a certain point in the
program. Thanks.

Chin Bhat.

-----Original Message-----
On Tue, 14 Sep 2004 11:36:05 -0700, "Chin Bhat"
wrote:

Hi,

I am writing a program with Access using VBA. I have a
table and need to do the following:

- stop Access from automatically creating a new blank
record
- create and jump to a new record (using code)


Is the user viewing the data on a Form? If so, you can

set the Form's
AllowInsert property to False (to keep them from seeing

the new
record); in your code you can include a line

DoCmd.GoToRecord acDataForm, "NameOfYourForm",

acNewRecord

to go to the new record. (You don't need to create a new

record, it's
always there).

John W. Vinson[MVP]
(no longer chatting for now)
.

  #4  
Old September 15th, 2004, 06:53 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Tue, 14 Sep 2004 21:31:11 -0700, "Chin Bhat"
wrote:

Thanks for your reply. The user is not actually viewing
the records. He/She is just entering information into
the viewer. I actually dont want a new record to just be
there. I want to create it at a certain point in the
program. Thanks.


I'm sorry, I think we're miscommunicating.

What is a "viewer"? That's not a term that has any meaning to me, in
an Access context.


John W. Vinson[MVP]
(no longer chatting for now)
 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to phrase If/Then clauses in the control source field Database Design 13 August 14th, 2004 04:22 PM
Visible or Invisible Code Dave Elliott Using Forms 18 July 27th, 2004 04:33 AM
Removing a form and all of the module code for it Jack Gillis General Discussion 4 July 25th, 2004 07:07 PM
Hi! Urgent pls: Protecting sheets so macros/buttons still work? StargateFanFromWork General Discussion 7 July 3rd, 2004 02:25 PM
Mutliple Tables lookup? Westley Database Design 4 June 15th, 2004 01:07 AM


All times are GMT +1. The time now is 10:27 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.