473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

form creates a record on opening

I have a form that has a single table as it's control source. Upon opening to a new record the PrimaryKey field(Autonumber) populates without having entered any data. I have the following code in the form's OnLoad event.
Expand|Select|Wrap|Line Numbers
  1. If Not Me.NewRecord Then
  2.         DoCmd.GoToRecord , , acNewRec
  3.     End If
I've checked all controls for a default value and none have any. There are also no default values defined in the table.
What could be causing this?
Thanks
Jan 28 '14 #1

✓ answered by Seth Schrock

Default values wouldn't create a new record. You would need to look in all of the form's events (Open, Load, Resize, etc.) for a macro or VBA procedure. You must have some code/macro that is editing the value in a field somewhere.

2 950
Seth Schrock
2,965 Expert 2GB
Default values wouldn't create a new record. You would need to look in all of the form's events (Open, Load, Resize, etc.) for a macro or VBA procedure. You must have some code/macro that is editing the value in a field somewhere.
Jan 29 '14 #2
You are right. I had code to clear unbound controls in a new record. I commented them out and that corrected the problem.
Thanks
Jan 30 '14 #3

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

Similar topics

0
by: Jeff Pritchard | last post by:
This is a twisted little problem. A client has an Access 2000 front-end using linked tables to a DNS to SQL Server 2000 back-end. With an Access 2000 back-end there is no problem. The problem...
2
by: Don Sealer | last post by:
How would I have my form open every time to a new record? I'm guessing it's possible but I can't make it happen. As always thanks, Don..........
22
by: Br | last post by:
First issue: When using ADPs you no longer have the ability to issue a me.refresh to save the current record on a form (the me.refresh does a requery in an ADP). We usually do this before...
7
by: Sam | last post by:
Hello All, We want our Call Service Representatives to be able to go back and view all the records in a table on a form. When closing and re-opening the form the form starts out as record 1 of 1...
1
by: Jimmy | last post by:
There is a command button on the form I'm working on. The form displays one record. The command button creates a new record by copying selected data from the current record: Dim dbs As Database...
4
by: Steven | last post by:
Hi, Would need some thought about using a button of the existing form to search record before deleting it. Any quick help is very appreciated. Steve
6
by: freeskier | last post by:
I have a form used for data entry of new records. Some of the fields on the form have a default value. One of the default values is derived from a combo box on a previous form (eg: create a new...
7
by: chrismaliszewski | last post by:
Hi. I created code which makes dynamically form with bounded controls for all columns. I show it to you below. My problem is, how I have to change this code to create form which record source...
8
by: Bay0519 | last post by:
Hi, I'm using access and outlook 2003. I have a form in access that show product test information (test #, action, etc) using product ID as PK. what I need to accomplish is once, the test...
1
by: goose6180 | last post by:
Scenario: Access DB sits on a network drive (available to all users by simple path) When a user creates a new test, they press a button and it creates an email with some information that is sent to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.