Form with strange criteria for record source

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

Guest

I am trouble shooting an existing application for a client. Someone else
developed it. Amoung other rather starange things, one special issues has
really gotten my attention. There is always the possibility that I am just
missing something, but I'd sure like to get some opinions from some of you.
So here goes...

A form has a query as its record source (nothing strange). However, when I
looked at the query, one of the criteria in the query is referencing a field
on the form for which it is susposed to be providing the data.

Question:
Is there any way at all that this could work?

Although I am not seeing any errors, it seems almost like a circular
reference. I am not seeing any data returned, but the person that hired me
says he is 95% sure that it works. I can eventually re-write this but under
the circumstances I thought I'd just run it by you guys.

In know this sounds crazy, but, thanks for any thoughts anywhy.

Mr B
 
This is absolutely normal, assuming that the control on the form which
the query references is unbound; it is (most likely) there for the user
to type in / select a value, on which to filter the records returned by
the query - a very common technique in Access apps. My guess is, if you
look at the control's events, one of them (Before/After Update, On
Change, On Exit...) fires a macro or some code which requeries the form.

HTH,
Nikos
 
Nikos,

Sorry for not being clear. The control is a bound control. That is the
reason i was running this by this group.

I am very aware of how an unbound control can be used as you describe.

Is there any circumstance where this can be correct using a bound control.
 
Well, Nikos, here I sit with egg on my face again. You'd think I would have
gotten used to it by now. :<)

After further review, and getting some rest, it seems that you are correct
and that the control is unbound.

I got it now. Thanks for the wake up call. I just went to sleep at the wheel.

Mr B
 
Back
Top