Auto filling of fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to add new records on a daily basis that share the same
information, but I would like to type in the shared data only once. Example
below
Table “carsâ€
Field 1 Make
Field 2 Model
Field 3 Year
Field 4 Color
Field 5 Vin#
Let’s say I need to enter 100 new records today that all are
Field 1= Mazda
Field 2= RX-8
Field 3= 2007

I would like to only be prompted to type in color (field4) and VIN#(Field5)
(on each record), but after finished the records would also contain
Mazda,RX-8 and 2007
Appreciate any help
 
Robert,
Using just Make for example. Use the AfterUpdate event to make the Default value for
Make equal to what you just entered.
Private Sub Make_AfterUpdate()
Make.DefaultValue = "'" & Make & "'"
End Sub
(expanding the quotes for clarity... " ' " & Make & " ' ")
The next new record you open will have Mazda in the Make field. At any time, you can
override that Default, and establish a new Default value.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Thanks for the help; I need to expand on my question a little bit. The actual
situation is scanning barcoded items out to a technician. I would like to be
prompted to enter the techs name once, and then scan barcode repeatedly
(assigning the barcodes to his name). What I’m trying to get away from is
entering techs name then barcode, name, barcode….

Name once then
barcode
barcode
barcode…
 
Robert said:
I would like to add new records on a daily basis that share the same
information, but I would like to type in the shared data only once.
Example below
Table "cars"
Field 1 Make
Field 2 Model
Field 3 Year
Field 4 Color
Field 5 Vin#
Let's say I need to enter 100 new records today that all are
Field 1= Mazda
Field 2= RX-8
Field 3= 2007

I would like to only be prompted to type in color (field4) and
VIN#(Field5) (on each record), but after finished the records would
also contain Mazda,RX-8 and 2007
Appreciate any help

I will make one suggestion and one comment

Suggestion: Holding down the control key and press the ' (apostrophe)
key and it will copy the prior record. (note that prior can be a moving
target) :-)

I suggest that part of your problem is table design. Fir example every
RX-8 will be a Mazda. I believe that you can eliminate all entry of make by
having separate table listing the model and makes. This is called
normalizing your table. It tends to make everything work more smoothly.
Databases don't work like spreadsheets. The same idea would apply to
families. You would not put in the name and address of each parent for each
child. You just relate their record to the parent record and they inherent
the address information.
 
Joseph
Your correct about table design, the car table was just an example I figured
all could understand make and models concept. The situation is a techs
picking up barcoded (each barcode is unique) material. What I’m trying to
accomplish is scanning the techs name once then walking with a wireless
barcode scanner and scanning 10-15 barcodes (away from the computer.) The
system currently is setup to scan techs name then barcoded Mtrl, then techs
name, barcoded Mtrl… I would like to scan the techs name only once then scan
just material to that tech. appreciate any help
 
Robert,
Did you try my suggestion? From your follow up post, I don't see why that should make
any difference. A Default Value will always enter on every "new" record. You should be
going to a new record after every barcode scan...
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Sorry Al,
Your method did work, but I need help fine tuning it. Example is below.

Fields Techs Barcode
Record 1 Robb 123
Record 2 Robb

I want to put Robb in once and stay in the Barcode field (creating new
records w/Robb as the tech). Currently using your method I end up scanning
123 and move to record 2 Robb field (and need to manual move to the Barcode
field)
I thank you for all your help AL.
 
Robert,
Several ways to do that... but try this...
I would place an "unbound" checkbox field (T/F) on the form called chkScanMode. Using
the OnCurrent event of the form...
If chkScanMode = True Then
DoCmd.GotoControl "Barcode"
Else
DoCmd.GoToControl "TechName"
End If

If chkScanMode is False, the form will work as always, with the default tab order. If
True, you'll go to Barcode on every new record.
Tech Barcode
Barcode
Barcode etc...
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Al
A million thank you's. I have been trying to figure this out for days... now
I can truly get my form to do what I need.
Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top