Form/subform worries 2007

J

JR Hester

Access 2007 on Win XP--
Attempting a (should be simple) data entry form in 2007; previously worked
in XP. and I can't seem to get all the fields to display data as needed. I
have three tables; employees-- name, number(ID), dept
sessions-- ID, date, time, location,
employee Transactions-- ID, Emp#(from employee), registered, attended, passed

I use the visual form build process rather than coding!

I get the main form data from teh session table-- no problem
I can then insert a subform of the Emp-Transaction table, -- I have set teh
employee field on the form to be a lookup from the employee table-- it
displays the name list for selection( in form view) however once selected
the field goes blank on the form, I have checked the table and it is being
updated with teh employee number which is the primary key of that table and
actually what I want to be stored in the TRX table. HOWEVER i need to display
the employee name on the form for human use-- This is where I am stuck.

Tahnks to anyone with teh knowledge and patients to help me through this
frustration.

Thanks in advance
 
F

Frank H

I've had a similar problem, but it was long ago enough I don't remember the
explanation, BUT...
First, the assumption is that the problem combo box is bound to the emplID
field, has the bound column set to the EmpID column, the bound column is
column 1 and the width of column 1 is 0" (all of which is the typical setup
for such a combo box).
Second, a fix that will work (if not ideal) is to put another calculated
text box on your subform to do the job of displaying the data, while
continuing to use the combo box to enter data:
Make the calculated text box bound to a DLookup function. Using the field
names you provided, something like:
=Dlookup("[name]","employees","[number(ID)]=" &
[Mainformname]![SubformName].Form.[controlNameBoundToTheEmp#OnTheSubform])

You may need to check that syntax.
 

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