pulling data as a label

C

Cameron

Thanks!
Did what you said but still get the #NAME? error

I recreated the tables as you suggested. [TblShiftDuty]!
[ShiftDutyID] is Primary key as is
[TblCompletedShiftDuty]![CompletedShiftDutyID] I have a
one to many relationship set up between [TblShiftDuty]!
[ShiftDutyID]and [TblCompletedShiftDuty]!
[CompletedShiftDutyID]

If I insert a text box on a form bound with: =[ShiftDuty]!
[ShiftDutyID] I get the error #NAME? Where am I going
wrong with this> Any help would be great!

Thanks
-----Original Message-----
You need to redesign your tables:

TblShiftDuty
ShiftDutyID
ShiftDuty

TblCompletedShiftDuty
CompletedShiftDutyID
ShiftDutyID
Initials


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


I am fairly new to Access, so I appreciate any input. I
have two tables:
1) Shift Duties with fields of Id, D1, D2, D3
2) Status with fields of Id, Completed, Initials

What I am trying to do is design a form that will pull in
the data from D1, D2 and D3 as labels so that they are
not editable and also display Completed and Initials so
staff can check off thier shift duties.

I tried doing a control source with =[Shift Duties]!D1
but I get #NAME?

TIA


.
..
 
J

John Vinson

I recreated the tables as you suggested. [TblShiftDuty]!
[ShiftDutyID] is Primary key as is
[TblCompletedShiftDuty]![CompletedShiftDutyID] I have a
one to many relationship set up between [TblShiftDuty]!
[ShiftDutyID]and [TblCompletedShiftDuty]!
[CompletedShiftDutyID]

ummm... No. If CompletedShiftDutyID is the primary key and also the
field that you're linking to it is - MUST BE - a "one to one"
relationship. A Primary Key is, by definition, unique within its
table.

What is the content of these tables? Are you perhaps using two similar
or identical tables, one for Shift Duty and one for Completed Shift
Duty? If so... you're making a mistake. You'ld be much better off
putting a Yes/No field Completed in the Shift Duty table and checking
it when the shift is complete.
If I insert a text box on a form bound with: =[ShiftDuty]!
[ShiftDutyID] I get the error #NAME? Where am I going
wrong with this> Any help would be great!

What is the *RECORDSOURCE* property of the form? The *only* fields
that you have available are fields in the Query or table upon which
the form is based. Just having a relationship does NOT magically add
the table to the form's recordsource query.
 

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