Why isn't data that is automatically generated in my form showing up in table?

  • Thread starter Nancy via AccessMonster.com
  • Start date
N

Nancy via AccessMonster.com

Ok, I've been messing with this problem all day (for those of you who have
been following me, I'm so sorry!). But I think I finally figured out the root
of my problem. I have created a form that allows users to enter in an
employee's clock number using a combo box and it automatically generates the
employee's name in a text box next to it by pulling information from the
Employee Data table. This data shows up fine in the form view and the
datasheet view. However, when I open the table up that this data is being
saved to (Weekly Data), the data that has been automatically generated is not
showing up. What could be causing this and what can I do to remedy it?
 
A

Al Campagna

Nancy,
I take it that the table does show the entered ClockNo, but not
the EmployeeName?
If so, that 's correct.
As a general rule...don't save a value in a record that can be derived
from other
value/s on that same record.
Since you have captured the ClockNo, you only need to "display" the
EmployeeName on your form. Given that you capture the key unique ClockNo,
you can always re-derive the EmployeeName, through it's relationship to
ClockNo, in any subsequent query or report. It may not be in the table, but
in a query, you could join the name back up to the ClockNo.

Ex. combo name = cboClockNo
A common method is to make the combo 2 columns... with ClockNo and
EmployeeName. (Ex. combo name = cboClockNo)
An unbound calculated text control, with a Countrol Source of...
= cboClockNo.Column(1)
will always "display" the correct name whenever a ClockNo is selected.
(Combo columns are numbered 0, 1, 2, etc... so the second column is
Column(1))

On my website (below) I have a 97 and 2003 sample file called...
Combo Populates Multiple Controls, which demonstartes the above.
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
N

Nancy via AccessMonster.com

Thanks for the response! I actually am using = cboClockNo.Column(1) as the
control source for my Employee Name box to look up the employee name when the
clock # has been selected. And it works perfectly. I am using this form so
that supervisors can do quick data entry so having the clock number generate
the employee name is a must. The problem comes in when I need to print out
all of that data in a report. You were right in saying that the table shows
the entered clock # but not the employee name. I am actually needing the
report to show the employee name and if it shows the clock # as well that
would be fine but it doesn't have to be there. What do I need to do to either
make the Employee Name show up in the table or set up a query to run this
report? I've tried making a query out of the two tables that make this form
up (the Employee Data table that supplies the form with data to pull from and
the Weekly Data table that the form actually saves data to). However, it just
returns a blank report. Any extra help you can provide on this would be
greatly appreciated. Thanks in advance!

Al said:
Nancy,
I take it that the table does show the entered ClockNo, but not
the EmployeeName?
If so, that 's correct.
As a general rule...don't save a value in a record that can be derived
from other
value/s on that same record.
Since you have captured the ClockNo, you only need to "display" the
EmployeeName on your form. Given that you capture the key unique ClockNo,
you can always re-derive the EmployeeName, through it's relationship to
ClockNo, in any subsequent query or report. It may not be in the table, but
in a query, you could join the name back up to the ClockNo.

Ex. combo name = cboClockNo
A common method is to make the combo 2 columns... with ClockNo and
EmployeeName. (Ex. combo name = cboClockNo)
An unbound calculated text control, with a Countrol Source of...
= cboClockNo.Column(1)
will always "display" the correct name whenever a ClockNo is selected.
(Combo columns are numbered 0, 1, 2, etc... so the second column is
Column(1))

On my website (below) I have a 97 and 2003 sample file called...
Combo Populates Multiple Controls, which demonstartes the above.
Ok, I've been messing with this problem all day (for those of you who have
been following me, I'm so sorry!). But I think I finally figured out the
[quoted text clipped - 8 lines]
not
showing up. What could be causing this and what can I do to remedy it?
 
A

Al Campagna

Nancy,
Please don't delete important info from previous posts. Just let the
thread grow, so responders can se the whole flow of the problem.

It's very rare that reports use a table/s as the RecordSource.
Usually it's a query.
In this case, using the query design grid...
Bring in the Weekly table.
Bring in the Employee table
Create/drag a relationship between WeeklyData ClockNo and Employee
ClockNo.
"Show all in Weekly, and only those in Employee that matches."
Drag ClockNo and EmployeeName to the grid.

Run the query from design mode, and when it returns the correct
data, place
those fields on your report.
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Nancy via AccessMonster.com said:
Thanks for the response! I actually am using = cboClockNo.Column(1) as
the
control source for my Employee Name box to look up the employee name when
the
clock # has been selected. And it works perfectly. I am using this form so
that supervisors can do quick data entry so having the clock number
generate
the employee name is a must. The problem comes in when I need to print out
all of that data in a report. You were right in saying that the table
shows
the entered clock # but not the employee name. I am actually needing the
report to show the employee name and if it shows the clock # as well that
would be fine but it doesn't have to be there. What do I need to do to
either
make the Employee Name show up in the table or set up a query to run this
report? I've tried making a query out of the two tables that make this
form
up (the Employee Data table that supplies the form with data to pull from
and
the Weekly Data table that the form actually saves data to). However, it
just
returns a blank report. Any extra help you can provide on this would be
greatly appreciated. Thanks in advance!

Al said:
Nancy,
I take it that the table does show the entered ClockNo, but not
the EmployeeName?
If so, that 's correct.
As a general rule...don't save a value in a record that can be derived
from other
value/s on that same record.
Since you have captured the ClockNo, you only need to "display" the
EmployeeName on your form. Given that you capture the key unique ClockNo,
you can always re-derive the EmployeeName, through it's relationship to
ClockNo, in any subsequent query or report. It may not be in the table,
but
in a query, you could join the name back up to the ClockNo.

Ex. combo name = cboClockNo
A common method is to make the combo 2 columns... with ClockNo and
EmployeeName. (Ex. combo name = cboClockNo)
An unbound calculated text control, with a Countrol Source of...
= cboClockNo.Column(1)
will always "display" the correct name whenever a ClockNo is selected.
(Combo columns are numbered 0, 1, 2, etc... so the second column is
Column(1))

On my website (below) I have a 97 and 2003 sample file called...
Combo Populates Multiple Controls, which demonstartes the above.
Ok, I've been messing with this problem all day (for those of you who
have
been following me, I'm so sorry!). But I think I finally figured out the
[quoted text clipped - 8 lines]
not
showing up. What could be causing this and what can I do to remedy it?
 

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

Top