473,397 Members | 2,068 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,397 software developers and data experts.

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 2347

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.Column(2)
LastName = cboSwimmer.Column(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.Column(2)
Me![Last Name] = Me!SwimmerID.Column(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******@pcdatasheet.com
www.pcdatasheet.com


"Geoff Portbury" <gp*******@dodo.com.au> wrote in message
news:41******@news.comindico.com.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******@pcdatasheet.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
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...
1
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...
1
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...
4
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...
2
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...
7
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...
3
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...
3
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...
3
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...
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
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
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
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
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...
0
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
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
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.