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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |