Autofill fields in forms in Access 2007

  • Thread starter Thread starter GrahamF
  • Start date Start date
G

GrahamF

Hi I have searched for this answer, however this forum may be my salvation
to this prob'
As I have a lot of repeating fields to fill in it would be handy toAutofill
fields in forms from previous fields .
thank you for any advice
Graham
 
Would it not be easier to use a "SetValue" macro to copy each field from form
one (1) to form two (2)?
Example...
Macro
OpenForm (select the form you want to open with this macro)
MoveSize (Set the form size and where you want it on the screen)

"SetValue"
Item:
[Forms]![ name of form 2 goes here]![ Name of field on form 2 goes here]

Experssion
[Forms]![ name of first form goes here]![ name of field on first form goes
here]

Form 2 is where you want the information to go. Foem 1 is where you want it
to come from.

Trial and error made this setup work. Hope it helps.
 
I think OP was referring to a single form with multiple records, not
multiple forms.

Damon

NEC-2008 said:
Would it not be easier to use a "SetValue" macro to copy each field from
form
one (1) to form two (2)?
Example...
Macro
OpenForm (select the form you want to open with this macro)
MoveSize (Set the form size and where you want it on the screen)

"SetValue"
Item:
[Forms]![ name of form 2 goes here]![ Name of field on form 2 goes here]

Experssion
[Forms]![ name of first form goes here]![ name of field on first form goes
here]

Form 2 is where you want the information to go. Foem 1 is where you want
it
to come from.

Trial and error made this setup work. Hope it helps.

Allen Browne said:
See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html
 
Graham

If you 'have a lot of repeating fields to fill in', there's a good chance
your tables are not well-normalized. If you were limited to using a
spreadsheet, then I can see that you'd repeat data in each record.

But Access is a relational database. Not only don't you need to repeat the
fields, it is a bad idea to do so.

.... or maybe I'm not understanding your situation. Feel free to
elaborate...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Of course Jeff, you are correct and I was wondering if anyone would pick me
up on
that I had repeating data, and I am pleased to see you have rightly done so.
You have jolted me into trying it out and bring myselt to be not so nervious
about normalizing.
It is a sporting database where I have fields such as:
RACEDATE
TRACK
RACENO
Then participing entrants

I will also have a second Table with the results
RACEDATE
TRACK
RACENO
Then winning entries plus their prizes ($) for doing so

Thus I will be able to do percentages of those winners
Regards
Graham Feeley
 
You are facing a "pay now or pay later" situation.

If you spend the time now to learn more about normalization and to redesign
your table structure, both you and Access will have less work to do the kind
of querying you describe.

.... or, you could keep your current structure and spend overtime (both you
and Access) coming up with workarounds to try to overcome the
less-than-well-normalized (e.g., "spreadsheet") structure and process.

Pay now or pay later!

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top