473,654 Members | 3,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Default field value = record number - How do?

Hi All,
I have a subform where the user can enter data. I would like a field to
default to the record number. How can I do this? (It can not be an auto
number field for other reasons.). Thanks.
Paula Irwin
Nov 12 '05 #1
2 3311
Record number of which recordset? A subform usually has a subset of the records of its
record source because it is filtered by data on the main form. Do you want to create a
field with consecutive numbers for the table that the subform data comes from?

If so, for the DefaultValue of the control, try

=DMax("[FieldName]","TableName")+ 1

--
Wayne Morgan
"Irwinsp" <ir*****@aol.co m> wrote in message
news:20******** *************** ****@mb-m19.aol.com...
Hi All,
I have a subform where the user can enter data. I would like a field to
default to the record number. How can I do this? (It can not be an auto
number field for other reasons.). Thanks.
Paula Irwin

Nov 12 '05 #2
Thanks for the help!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8219
by: Terry Bickle | last post by:
Please forgive me for using the wrong term here or there. I'm an old Excel 4 macro guy who didn't convert to VB and I'm tinkering with an Access 2000 DB. I'm sure there is a simple Access 101 answer for this. I have a subform which the user selects an item description from a combo box from a table. I want to obtain the cost for the item (another field in the table) also. I've been able to produce the second data field by rewriting the...
2
1801
by: hyphen | last post by:
I have set up two date fields in a table: 1stpromisedDate and CurentPromisedDate The first field is to record the 1st promised delivery date of a supplier and the second is to record the current promised ate from a supplier. In an ideal world these two dates will always be the same, but in reality the delivery date will change. Therefore I want to set the currentpromisedate to default to the 1stPromiseDate value. I need
1
5412
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the database so I could sort the records by the date at which they were entered. Well now I've deleted some of those records so its of course causing gaps in the records. The record number in Access no longer matches my record number that I...
10
2747
by: MLH | last post by:
I have an A97 table with a Yes/No field named TowJob and a form bound to that table. The TowJob control on the form is bound to the same field. It is an option group with Yes and No bttns valued at -1 and 0 respectively. Unless I specifically set the table field's defaultvalue to Null, the form comes up with an automatic value of 0 in the control? The control has NO default value property setting. Why is that?
7
7235
by: astro | last post by:
Anyone have suggestions on where to troubleshoot this error? Background: -Access 2k v. 9.0.6926 sp3 - front and backend on production server (wiindows 2k) -accessed via Citrix -front-end is mde, backend is mdb -only occurs on the production server -only occurs with mde verson - i've tested the problem with the mdb version of the front-end and it loads/generates the document fine on the production
3
2589
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table) and children form (table). Relationship equals one to many. I'd like to auto number the fields accordingly and traditionaly I assign a unique number based on a table value that I retrieve + 1. i.e. Parent record field value = 1 Children record...
6
8521
by: carmela_wong | last post by:
Hello all, I am trying to set the default value of a combo box to "USA" which does not work although I have entered this in the Default Value property of the control. The combo box shows the values "USA", "Canada" and "Mexico in the drop-down menu. I am able to accomplish this in a list box but that is not what I want. I need the combo box. Thank you for any advice. CW
4
3375
by: helenwheelss | last post by:
Access 2003, using a bound form. I'm seeing rather annoying behaviour when editing data in a control with a default value. It only happens when the form is on a new record. A specific example: on my form, the first control is bound to a date/ time field and has a default value of now(). When users need to change this control's data, they'll most commonly need to alter the time part leaving the date as is. But, on a new record, when...
4
6638
by: TinaF | last post by:
I want to set a default value in a table called "Quotes" for a field called "Source." The "Source" field uses a lookup table called "Source" which looks like this: Sourceabbrev Sourcename BX-MI BUILDERS EXCHANGE MI BX-OH BUILDERS EXCHANGE OH CNS-MI CONSTRUCTION NEWS SERVICE MI
0
8375
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8593
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7306
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2714
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 we have to send another system
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.