Referencing a field in a form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform within a main form. The query the subform is based on
relies on a field in the main form. How do I reference that field? i.e.:
select phone from phone_tbl where phone_tbl.name = 'field on main form'.

The field on the main form is a value stored in the name table.

Any help would be most appreciated.

Thank you.
 
In the subform's property sheet, data page, set the link child and link
master fields.

hth,

Susan
 
Susan,

Thank you for the quick reply.

Those properties appear to only show when the field that I want to display
is a list box field. I did have the field as a list box and those fields
that you recommended be filled in where filled in. The values were the
correct values. So I am still at a lost as to how to reference that field in
the main form, or for that matter to any field in any form, but for now, I am
just trying to reference that main form field.

Again, I really appreciate your reply and help. Do you have any other
suggestion's that I might try?

Craig
 
You should be able to tie them together this way - perhaps try a copy of the
main form, remove the subform and reinsert it. Be sure in the wizard to
choose the form then select "define my own" for the linking, selecting the
field which is common to both forms.

hth,

Susan
 
Susan,

I agree, I 'should' be able to do that. I made a copy of the main form and
deleted the subform. I then reinserted it using the wizard and choosing
"define my own". The results are the same. I am missing something, I just
do not know what. This is a 1 to many relationship and help stated this was
the way to do it. Things 'work' when the field is a text box, however, I
want to have all the child rows that belong to the Master show up, at least
the first 4 or 5, then have a scroll bar if there is more. I thought I would
try to knock this out in one or more ways. I did not think that it would be
this hard. I know that I must be approaching this the wrong way, but I just
don't know how else to do it.

Thank you for you help. I will keep trying. Your suggestions help me to
know about how to do things. If you can think of anything else, please let
me know.

Craig
 
Susan,

Thank you for your reply. I am really at a loss here. I do not know what
you mean by what type of 'control' am I using. I didn't know I was using a
control. I know that does not help the situation, but I really don't.

I suppose my expectation of how 'easy' MS had mad access was way above
reality. I was comparing this to other products that I have had no issue
with doing something as, what I feel should be easy, and yet spending 2 days
to try to figure this out is just to much time.

I know that is has to be something very simple, otherwise the issue would
have been resolved by now -experience tells me that the easy issues are the
hardest to find.

Oh well, I will figure something else out.

Thank you for all your time.

Craig
 
On the form, you said it worked as a lookup, then your second post you said
it worked as text. So I'm assuming you are now trying to use a different
type of control on the form, and wonder if the control type is a mismatch to
the data type of the fields (data is text but your form is trying to put
them in a checkbox or somesuch)
 
Back
Top