473,653 Members | 2,968 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto Populating field

I'm a swimming club coach.
I have a data base for recording times at various meets.
I have a FORM for entering times called SWIM TIMES.
When I enter the swimmers name ID, eg FOR01 for Doug Ford I want "Doug" to
populate the FIRST Name field and "Ford" to populate the Last Name field. At
present I have to manually enter them.

I have a table called Name ID in which I have stored the swimmers ID numbers
, first and last names in the following manner
Field-- Name ID (Primary Key). eg FOR01
Field-- First Name. eg Doug
Field-- Last Name. eg Ford

Information entered into the Swim Times form populates a table called TIMES.

Can anyone understand this and help?
I have no knowledge of programming.
Geoff Portbury
Nov 13 '05 #1
5 2361

Geoff Portbury wrote:
I'm a swimming club coach.
I have a data base for recording times at various meets.
I have a FORM for entering times called SWIM TIMES.
When I enter the swimmers name ID, eg FOR01 for Doug Ford I want "Doug" to populate the FIRST Name field and "Ford" to populate the Last Name field. At present I have to manually enter them.

I have a table called Name ID in which I have stored the swimmers ID numbers , first and last names in the following manner
Field-- Name ID (Primary Key). eg FOR01
Field-- First Name. eg Doug
Field-- Last Name. eg Ford

Information entered into the Swim Times form populates a table called TIMES.
Can anyone understand this and help?
I have no knowledge of programming.
Geoff Portbury


sure. set up your combobox to have 4 columns with a rowsource like
this:
SELECT SwimmerID, FirstName & " " & LastName AS Swimmer, FirstName,
LastName"

then hide the first column. (columnwidths: 0;1)

then set your two fields
FirstName = cboSwimmer.Colu mn(2)
LastName = cboSwimmer.Colu mn(3)
columns are zero-based collections, so the first column is column 0.

Nov 13 '05 #2
Create a query named QrySwimmers based on your table Name ID. In the first
field, pull down Name ID. Type in the following in the second field:
Swimmer:[Last Name] & ", " & [First Name]
in the third field pull down First Name and in the fourth field pull down
Last Name. Set the sort on Last Name to Ascending.
In your Swim Times form, replace the textbox where you enter swimmers name
ID with a combobox. Select the combobox and open properties to the Data tab.
Use the down arrow at the right to set the Row Source property to
QrySwimmers. Set the Bound Column property to 1. Click on the Format tab.
Set the number of columns to 4 and set the column widths property to
0;2;0;0. Click on the Other tab and name the combobox SwimmerID. Click on
the events tab. Click in the AfterUpdate event box and then click on the
three dots at the right. In the dialog that appears, click on Code Builder.
The code page for your form will open and you will see two lines of code.
Type in the following code between those two lines:
Me![First Name] = Me!SwimmerID.Co lumn(2)
Me![Last Name] = Me!SwimmerID.Co lumn(3)
This code presumes the first name and last name fields on your form are
named First Name and Last Name. If different, type in the actual field
names.
Close everything and the open your Swim Wimes form. You will now be able to
select the swimeers rather than entering their code. When you make a
selection, you will actually be entering the swimmer's name id although you
see his name. The first and last names of the selected swimmer will
automatically be entered in the First Name and Last Name fields.

This will all work for you; however, your database should be set up quite
differently. Other things you might want to do with the database and
reporting are going to be difficult!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com


"Geoff Portbury" <gp*******@dodo .com.au> wrote in message
news:41******@n ews.comindico.c om.au...
I'm a swimming club coach.
I have a data base for recording times at various meets.
I have a FORM for entering times called SWIM TIMES.
When I enter the swimmers name ID, eg FOR01 for Doug Ford I want "Doug" to
populate the FIRST Name field and "Ford" to populate the Last Name field. At present I have to manually enter them.

I have a table called Name ID in which I have stored the swimmers ID numbers , first and last names in the following manner
Field-- Name ID (Primary Key). eg FOR01
Field-- First Name. eg Doug
Field-- Last Name. eg Ford

Information entered into the Swim Times form populates a table called TIMES.
Can anyone understand this and help?
I have no knowledge of programming.
Geoff Portbury

Nov 13 '05 #3

Thanks for the help. I'll give it a go.
As for setting the Db up quite differently, well you're no doubt right
but I have no training whatso ever and only progressed as far as this by
reading MS-Access help.

Geoff P.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4
If you are need of a "better" database, I am in business to provide
customers with a resource for help with Access, Excel and Word applications.
My fees are very reasonable. Contact me at my email address below.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com
"Geoff Portbury" <gp*******@dodo .com.au> wrote in message
news:41******** **@127.0.0.1...

Thanks for the help. I'll give it a go.
As for setting the Db up quite differently, well you're no doubt right
but I have no training whatso ever and only progressed as far as this by
reading MS-Access help.

Geoff P.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #5

I've tried this suggestion four times being very carefull to follow the
instructions to the letter.
The result is a Combo box that displays the first entry in my Lastname
field over and over again.
I ran Debug and the first line of the added code is highlighted.
Any suggestions?

Geoff P
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #6

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

Similar topics

3
12589
by: sao | last post by:
I am currently using Access 2000. In my table it is the following fields that are set up: 1 - Staff Name 2 - Department This table is already populated with 100+ records (staff along with department.)
1
1803
by: Jason Galvin | last post by:
I would like to disable the auto-populating feature (remembers form element text between post-backs) when creating a .NET form. I have succeeded in disabling auto-populate by creating my controls during PreRender, but that becomes highly cumbersome. Is there a way to explicitly turn off auto-populate? I'm pretty sure the form isn't getting auto-populated by the ViewState mechanism, because I've specifically set EnableViewState to...
1
9400
by: Thumper | last post by:
I have created a "Services" table in Access. Within this table I have a "Services Provided" combo box that lists various services I have populated in a "Products" table. I also have a "Default Price" field in the "Services" table. However, I would like for this field to auto-populate a value once a service is selected from the combo box. I have defined default price values in the "Products" table and am not sure how to have this data...
4
3426
by: JayV | last post by:
I've created a data entry form. I have multiple fields but the fields "Road Log #" and "Road Name" I want to be bound to each other. I also have a table that lists out 1200 road log numbers and their corresponding road log names. I want the number that is entered into "Road Log #" to auto populate the "Road Name" with the correct name from the table. Help? I don't know much about the expression builders. But I tried messing around with things...
2
2563
by: kkramer | last post by:
I have a table in Access which is auto populating fields which I do not want to happen. If I list a number in a field, and then another number in the field below it, and then a third number, if those numbers happen to coincidentally follow a pattern (for example, 10322,10324,10326), the fields below are auto populating to follow the same pattern. I can't seem to figure out how to shut that off--it must have been a default because it wasn't...
7
2842
by: dozingquinn | last post by:
Hello, Is there any way to auto populate the user defined date range into a report? I currently have the criteria "Between And " for a date range field. This prompts the user to enter a date range before the report is visible. Is it possible to capture this date range and display it on the report? I am using Access 97 Thanks!
3
2168
by: Wayne L | last post by:
Ok now everyone has mentioned not to use auto number if it means anything to the user. My application uses the auto number for exporting only. I append the mastertbl column with my starting number of 0001(4 digits) (prior to populating the table). When information is imported and appended via a query to the mastertbl it will start with 0002 and increment. All tables used are cleared with a delete query after being exported, this allows the...
3
2017
by: GODSPEEDELECTRONICS | last post by:
My database is simple. It has a table that tracks customers, with they're name, address, etc. I have a price list table that contains "iteminstall" , "price", and "qty" and I have a payment table that trackes date, and payment amount. I have a subform, with the field (textbox) "price." I have it auto populate when I type in something under (combobox) "iteminstall". This is a recent addition. I used to have to type it manually. In...
3
2512
by: Puzzled and Confused | last post by:
It seems like a simple request, but I cannot get it to work. Does anyone know to how to make data from one field auto populate in another field, only if the answer is yes/true? I have a form that I would like the exact data, which varies, to auto populate only after an update to yes. A toggle button is to answer the field, but I would like for the answer to be the data from another field. Please advise. Thanks!
0
8811
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
8704
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8590
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
7302
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
6160
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
5620
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
4147
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2707
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
1591
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.