Therese,
In your description of the process, you said the value of SpecificField was
a number... 1, 2, 3.
Therefore, I would have expected to see this in your macro condition:
[SpecificField]=1
.... instead of:
[SpecificField]="Report 1"
Getting sidetracked from your main question...
I am also unsure of the purpose or meaning of lines 1 and 2 in your macro,
OpenQuery and Close. This procedure does not appear to achieve anything, so
you can probably delete them from the macro.
The Requery in line 3 is also unusual... why do you need that?
--
Steve Schapel, Microsoft Access MVP
"Therese G. Maddox" <(E-Mail Removed)> wrote in
message news:F1325AD8-325C-4E75-944E-(E-Mail Removed)...
> Hi all!!
>
> I'm writing a macro that isn't working.
>
> Basically, I have a field [SpecificField] in a form that is determined by
> some criteria choosen on the same form. The field comes up correctly with
> a
> number.
>
> Now I want to take that number in the field and tell access to to open a
> form per the number. For example, if the field is = 1, then open Form 1,
> If
> the field = 2, then open form 2, etc.
>
> I'm using the conditions field of the macro and its not working at all.
> I'm
> not getting any error messages or anything. Basically I have it set up
> like
> this:
>
> Condition Action Argument
> 1 OpenQuery Form
> Query,Datasheet,Edit
> 2 Close Form Query, Prompt
> 3 ReQuery SpecificField
> 4 [SpecificField]="Report 1" OpenForm Form 1,Form,,,,Normal
> 5 [SpecificField]="Report 2" OpenForm Form 2,Form,,,,Normal
> 6 [SpecificField]="Report 3" OpenForm Form 3,Form,,,,Normal
>
>
>
> Line 4 opens a form named Form 1 if [SpecificField] on the open form =
> Report 1
> Line 5 opens a form named Form 2 if [SpecificField] on the open form =
> Report 2
> Line 6 opens a form named Form 3 if [SpecificField] on the open form =
> Report 3
>
> and so on.
>
> Its not working. What am I doing wrong, or missing?
>
> Thanks!!
>
>
>
|