Prepopulating Forms with existing Data

  • Thread starter Thread starter ElHreffe
  • Start date Start date
E

ElHreffe

Hi all,

I am relatively new to Access but have done some VBA programming.

My starter Access project is a Expense Report database.

I have a Employee table and a Expense Report table - and I would like to:
a) Hit 'Enter Expense Report' from the switchboard.
b) Have a 'Select Employee' form listing all employee names. (Continous
Form?)
c) Either clicking the name as a link - or highligt the name and have a
action button.
d) Once hitting the link or action button the 'Expense Report' form opens -
here the Employee's data in the header has allready been prepopulated from
the Employee table.

I thought it would be an easy task, but I think I stared myself blind
somewhere between specific Access VBA methods, figuring out Macro functions
and tricks on Query Forms.

Any pointers will be appriciated.

Tia,
Jeppe
 
Hi all,

I am relatively new to Access but have done some VBA programming.

My starter Access project is a Expense Report database.

I have a Employee table and a Expense Report table - and I would like to:
a) Hit 'Enter Expense Report' from the switchboard.
b) Have a 'Select Employee' form listing all employee names. (Continous
Form?)
c) Either clicking the name as a link - or highligt the name and have a
action button.
d) Once hitting the link or action button the 'Expense Report' form opens -
here the Employee's data in the header has allready been prepopulated from
the Employee table.

I thought it would be an easy task, but I think I stared myself blind
somewhere between specific Access VBA methods, figuring out Macro functions
and tricks on Query Forms.

How about a solution involving no VBA or macro code AT ALL? It's
simpler than you think!

Create a Form based on the Employee table.

Put on it a Subform based on [Expense Report], using the EmployeeID as
the Master/Child Link Field.

If you wish (and here you'll need five or so lines of wizard-generated
code) you can put an unbound Combo Box on the mainform to select an
employee. Use the Toolbox, click the magic-wand icon, and use the
Combo Box tool; choose the option to "find a record in the table".

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Thanks John - the combobox was what I needed - having too many options
apparently what confused me, but your 'Best Practise' was comforting to me.
I had a feeling Access had something out of the box... just a matter of
finding it ;)

Thanks,
Jeppe

John Vinson said:
Hi all,

I am relatively new to Access but have done some VBA programming.

My starter Access project is a Expense Report database.

I have a Employee table and a Expense Report table - and I would like to:
a) Hit 'Enter Expense Report' from the switchboard.
b) Have a 'Select Employee' form listing all employee names. (Continous
Form?)
c) Either clicking the name as a link - or highligt the name and have a
action button.
d) Once hitting the link or action button the 'Expense Report' form
opens -
here the Employee's data in the header has allready been prepopulated from
the Employee table.

I thought it would be an easy task, but I think I stared myself blind
somewhere between specific Access VBA methods, figuring out Macro
functions
and tricks on Query Forms.

How about a solution involving no VBA or macro code AT ALL? It's
simpler than you think!

Create a Form based on the Employee table.

Put on it a Subform based on [Expense Report], using the EmployeeID as
the Master/Child Link Field.

If you wish (and here you'll need five or so lines of wizard-generated
code) you can put an unbound Combo Box on the mainform to select an
employee. Use the Toolbox, click the magic-wand icon, and use the
Combo Box tool; choose the option to "find a record in the table".

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top