form control recalculate

bobbybeers

Registered User.
Local time
Today, 03:24
Joined
Mar 14, 2013
Messages
17
I have two combo boxes on the same form and for some reason one recalculates and updates and the other one doesn't. The control source for each is as follows:

=DLookUp("[03_END_PREP].[END_PREP_DESC]","03_END_PREP","[PDS_PREP] = '" & [PREP_A_subform] & "'")

=DLookUp("[OPT_DESC]","10_OPTION","[PDS_OPT_NUM] = [PDS_OPT_subform]")

Is there any reason why one would recalculate automatically and the other wouldnt??

By the way, I've coded the second one EXACTLY like the first one except the proper tables etc were added, and it just doesn't work for some reason....
 
I've coded the second one EXACTLY like the first one

No you haven't. Access accepts 0 sloppiness. Compare them character by character (disregarding the differences in table/variable names) and see the difference.
 
what I meant to say is:

I have this and it works great:
=DLookUp("[03_END_PREP].[END_PREP_DESC]","03_END_PREP","[PDS_PREP] = '" & [PREP_A_subform] & "'")

I tried this and it doesn't work (I can't explain why):
=DLookUp("[10_OPTION].[OPT_DESC]","10_OPTION","[PDS_OPT_NUM] = '" & [PDS_OPT_subform] & "'")

So as an alternate option, I used this and it works, but won't recalculate like the first beauty which works great:
=DLookUp("[10_OPTION].[OPT_DESC]","[10_OPTION]","[PDS_OPT_NUM] = PDS_OPT_subform")

Any idea why the first one recalulates and the third one doesn't?? As for why number 2 doesn't work I have tried and tried and cant figure it out, thus why I am using the third line
 
I have no clue as to what "doesn't work" means.

Sorry mate - this is very basic stuff and it is described in the documentation for Dlookup. Look it up there, or wait until less bitchy helper happens to drive along :D
 

Users who are viewing this thread

Back
Top Bottom