473,508 Members | 2,206 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I want to open my contacts form to a new form

I'm trying to create a form that opens to a new record but will allow me to update existing records if I need to. In the form properties Event tab, On Load, the code I am using is:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.GoToRecord, acDataForm, "frmAlumniContactInfo", acNewRec
but the record still opens to the first record in the data set
Nov 10 '10 #1
1 1001
NeoPa
32,557 Recognized Expert Moderator MVP
I'm not sure about this because in my testing I couldn't even get any code in the Form_Load() event procedure to fire. That's another problem though I expect.

In your case I suspect the extra comma (,) is confusing matters. You should try instead :
Expand|Select|Wrap|Line Numbers
  1. DoCmd.GoToRecord Record:=acNewRec
These methods are designed to be able to be used to control other objects as well, but generally the current object is required, in which case the type and name can be omitted.

Let me know if the code works for you. As I say - I couldn't even get the event procedure to run anything. I expect that was something silly I have in my testing, but curious anyway.
Nov 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2720
by: elieli_132 | last post by:
Hi, My problem is the following: Made changes to code in form and closed the form. Now unable to open / design the form. - Tried copying and pasting - the new one does not open /display....
1
2950
by: 4004 | last post by:
I would like to open a columnar form (so I can see all the details) from a datasheet form (so I can see what is there) but keep the same recordset and current record. I can do the recordset set...
5
4224
by: oo | last post by:
Hi all, I am relatively new to .NET and C#. I am trying to open an additional (new) form when a button is clicked on an already existing form, but i want that this winform will be added to the...
7
2777
by: Stephan Unger | last post by:
Hi all, i want to open a new Form in my VB.NET Application. How can i do this when i want to add a paramter? i know the code: frmxxx.showdialog() or frmxxx.show
2
1716
by: dbuchanan | last post by:
Hello, I want to open a child form based on the record selected in a dataGridView of the parent form. I want the child form to open with a populated child table based on the selected parent...
4
2170
by: Sibasis Ganguly | last post by:
I want a vb code by which ,when I open the database directly that created form will open , I don't want to click on form button then opening the form. If there is any code for my problem please...
9
1676
by: Don Croner | last post by:
Hi: The data base (access 2003) I am creating will have 150 employee files in it. I want to open a form to edit employee information. ie, if employee john smith gets a pay raise i want to edit his...
2
1391
by: troy_lee | last post by:
Let's say I have a template form named Form1. I have two text fields named Month and Year. Using an event procedure from another form, I want to: 1) Open the template form 2) Name the form...
2
1917
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Hey guys, I've got a MAIN form, which I have a series of navigational buttons on. When I open a secondary form from that form, I'd like to be able to HIDE the original form. The reason is, if...
1
3281
by: faisalabdul | last post by:
hi friends... i am new to C#.net. how can i open a new form automatical in c#.net 2005.i have created one table which contain username and password.if i select one user and click ok button...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7383
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.