Combo box problem in database

G

Guest

I have a table with 160 records. I am trying to set up my form so the user
can select a record from a combo box, enter the payroll in a text box field
and submit. Then they can perform the same function several times and each
record will show up on my report with the payroll for each separate record.
I’ve tried the combo box on the form page but when you select one or several
selections, all 160 records are displayed on the reports page.
Would also like a suggestion on how to have it set up for the user to enter
the payroll (automatically rounded to the closest dollar) each time they
select a record. Would also like to show the sum (on the reports page) of all
payroll amounts selected on the forms page. Any comments will be appreciated.
 
J

Jeff Boyce

I'm having a bit of trouble visualizing your situation...

It sounds like you want a way to print out a report for a single record.
You can do this by adding a command button on your form, and in the OnClick
event procedure, use:

DoCmd.OpenReport ...

with the syntax that limits it to the record that the form is focused on
(see Access HELP for particulars).

Or have I mis-interpreted?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

I want to print a report with all selected records and their corresponding
payroll.

I'm trying to setup this form to where the classification can be selected
(Combo box), then move to a (List box?) and enter the corresponding payroll,
and then click a command button to save this record (with the corresponding
payroll) to a "payroll table". This "payroll table" would hold all selected
classifications with their corresponding payroll. Then move to the next line
and repeat the same steps as above but select another classification (unless
I can stay on the same line Combo box and continue repeating and saving). The
report would receive the data from the "payroll table" showing each selected
classification and payroll. These payroll entries would need to be summed.
Ps: Is their an expression or formula that automatically rounds the payroll
to the nearest $ dollar?
Thank you for showing interest--- I value your opinions.

--
mpjr


Jeff Boyce said:
I'm having a bit of trouble visualizing your situation...

It sounds like you want a way to print out a report for a single record.
You can do this by adding a command button on your form, and in the OnClick
event procedure, use:

DoCmd.OpenReport ...

with the syntax that limits it to the record that the form is focused on
(see Access HELP for particulars).

Or have I mis-interpreted?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jeff Boyce

see comments in-line below...

mpjr said:
I want to print a report with all selected records and their corresponding
payroll.

I'm trying to setup this form to where the classification can be selected
(Combo box), then move to a (List box?) and enter the corresponding
payroll,
and then click a command button to save this record (with the
corresponding
payroll) to a "payroll table".

Access is based on data. Building forms and reports before data structure
is a way to get (you and Access) quite confused.

What is this "payroll table"? Are you using this as a temporary storage for
what you want to report? If so, there may be another approach that does NOT
require adding, filling and emptying a new table.
This "payroll table" would hold all selected
classifications with their corresponding payroll. Then move to the next
line
and repeat the same steps as above but select another classification
(unless
I can stay on the same line Combo box and continue repeating and saving).

We're not there. I have no idea what you mean by "move to the next line"?
The
report would receive the data from the "payroll table" showing each
selected
classification and payroll. These payroll entries would need to be summed.

"Summed" across what? All entries? Classifications? ... other?
Ps: Is their an expression or formula that automatically rounds the
payroll
to the nearest $ dollar?

You can use the Format() function to display currency with no decimal
places.
Thank you for showing interest--- I value your opinions.


Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Similar Threads


Top