Form to show a field from the related table..how ?

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hi,
I have Tbl_BookBasics and a Form F_BookBasics.
I also have Tbl_BookPhotoBasics and a form F_BookPhotoBasics to enter data
on the photos within the book
One to many relationship. Tbls linked on PrimaryKey ID in Tbl_BookBasics and
a field called ID in Tbl_BookPhotoBasics
All very straightforward stuff.

The F_BookPhotoBasics will be a subform in F_BookBasics, launched via a
button so I wont see the F_BookBasics

Whilst entering data into F_BookPhotoBasics I wish to have a visual check
that the book I am studying and entering data on, is the correct one.

To do so, I need to display the book number in that subform. The field in
Tbl_BookBasics for it is BookSingleCodeNumber. a field where the books
written in unique number is entered via keyboard. How do I make that
field show in F_BookPhotoBasics so that it displays the book code number ?

Can I design this into the form before using the subform creation wizard and
selecting the form to be the subform ?

I often wish to do this, on subforms and also standard forms so methods for
both would be helpful.

Regards

Steve
 
Hi Bonnie,
For simplicity sake for posting, my Form names and field names were
fictitious.
I followed your method on the real ones.

I created an unbound text box on the subform, having launched the form that
is used for the subform, that form being designed prior to being inserted as
subform.
r/click on the unbound text box and chose properties.
for control source I typed :-
=forms!F_BOBC_Books_SNT_BasicDetails.BOBC BOOK CODE NUMBER

and clicked in an other line below to apply it
and got an invalid warning.

Suspecting it to be the field name with gaps, something done in my early
years before I knew better !...I added underscores. It accepted it.
Putting [ ] in and making form with capital F as Form as seen below.

corrected all occurrences throughout the dbase so everything ran again !

that control source line has
=[Forms]![F_Books_SNT_BasicDetails].[BOOK_CODE_NUMBER]

However in normal view it displays #Name?

Whats wrong ?

You also mentioned query, however the forms I fill in are not based on
queries.

I could never get on with such, certain searches, entries etc as far as I
recall didnt go as I wanted and forms related to tables do work best for me.

Regards

Steve
 
....oops ...missed out the BOBC in typing the second part of the text below,
its there in reality and not a cause for the function failure..
Steve

Steve said:
Hi Bonnie,
For simplicity sake for posting, my Form names and field names were
fictitious.
I followed your method on the real ones.

I created an unbound text box on the subform, having launched the form
that is used for the subform, that form being designed prior to being
inserted as subform.
r/click on the unbound text box and chose properties.
for control source I typed :-
=forms!F_BOBC_Books_SNT_BasicDetails.BOBC BOOK CODE NUMBER

and clicked in an other line below to apply it
and got an invalid warning.

Suspecting it to be the field name with gaps, something done in my early
years before I knew better !...I added underscores. It accepted it.
Putting [ ] in and making form with capital F as Form as seen below.

corrected all occurrences throughout the dbase so everything ran again !

that control source line has
=[Forms]![F_Books_SNT_BasicDetails].[BOOK_CODE_NUMBER]

However in normal view it displays #Name?

Whats wrong ?

You also mentioned query, however the forms I fill in are not based on
queries.

I could never get on with such, certain searches, entries etc as far as I
recall didnt go as I wanted and forms related to tables do work best for
me.

Regards

Steve
 
Back
Top