
Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I understand this all except where this code would be entered. Can I enter
>it
[quoted text clipped - 96 lines]
>> >
>> > Bill_De
I tried entering what you told me and I got a couple of error messages. I
should try to clarify what I have and am trying to do as this may not even be
possible.
I have 3 forms that open in a tab control. The first form is the primary
form "fmsContacts" I don't need anything to update on this form. I have two
sub forms "fmsReg" and "fmsRegpay". In the fms regpay I have a drop down that
allows me to choose the payment status ie. pending, paid, closed etc. I also
have a text box in fmsreg that does a DLOOKUP to get the payment status.
When I close out the forms and then reopen them the staus box with the
dlookup in fmsreg changes and shows the payment staus that I select in form
regpay.
What I am trying to accomplish is when I select a status in fmsregpay it
will update in fmsreg automatically.
I entered your suggestion: Forms!fmsReg.[Text34].Form.Recalc
I got the following error message: Run time error 2465 - Microsoft Access
can't find the Form 'fmsReg' referred to in a Macro Expression or VB Code.
I then change the expression to: Forms!fmsContacts!fmsReg.[Text34].Form.Recalc
I got the following error message: Run Time Error 438 - Object Doesn't
support this property or method.
I know that if I put a command button in a form to refresh the form the code
is as follows: DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5,, acMenuVer70
My thought and please let me know if I am on the right track or not is I am
not doing a recalculation I am trying to do a refresh so would I enter the
above code in place of the "recalc" in your expression? If I am on the right
track would I write the expression- Forms!fmsContacts!fmsReg.DoCmd.DoMenuItem
acFormBar, acRecordsMenu, 5,, acMenuVer70.???
Or is there a different expression I should write or write the above in a
different way.
Thanks for any advice you can give me on this.
Bill_De
> I don't really understand what your code is meant to achieve, but yes,
> presumably it goes into the same Click event, after the lines that cause the
[quoted text clipped - 100 lines]
> >> >
> >> > Bill_De
Allen Browne - 07 Nov 2006 09:15 GMT
The ".Form" bit is in the wrong place.
You force a recalculation of the form not the text box.
Try:
Forms!fmsContacts!fmsReg.Form.Recalc
The subform is not open in its own right, so the "Forms!fmsReg..." one would
not work.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I tried entering what you told me and I got a couple of error messages. I
> should try to clarify what I have and am trying to do as this may not even
[quoted text clipped - 162 lines]
>> >> >
>> >> > Bill_De
Bill_De - 18 Nov 2006 10:25 GMT
Sorry I haven't gotten back to you been down sick for awhile.
I tried the code you wrote below and it worked just fine. I have now been
able to finish my database.
Just wanted to drop you a quick line to say thanks for all the help.
Bill_De
> The ".Form" bit is in the wrong place.
> You force a recalculation of the form not the text box.
[quoted text clipped - 170 lines]
> >> >> >
> >> >> > Bill_De
Allen Browne - 18 Nov 2006 10:51 GMT
Excellent.
Hope you're feeling on top of the world again soon.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Sorry I haven't gotten back to you been down sick for awhile.
> I tried the code you wrote below and it worked just fine. I have now been
[quoted text clipped - 3 lines]
>
> Bill_De