Group:  Microsoft Access ยป microsoft.public.access.macros
Thread: How to run Form_Current() from macro? or module?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

How to run Form_Current() from macro? or module?
Tec92407 03.03.2006 19:03:28
I have the following function in a module named Module1

Public Function CheckCommandLine()
Dim strRecNo As String
Dim intRecNo As Integer

strRecNo = Command
MsgBox ("You typed " & strRecNo)
intRecNo = Val(strRecNo)
'Couldn't get this to work
'DoCmd.OpenForm "PRRequisition", acNormal, , "PRREQNo = '50000'"
'The Following Works but I need it to run Form_current
DoCmd.OpenForm "PRRequisition", acNormal
DoCmd.GoToRecord acDataForm, "PRRequisition", acGoTo, intRecNo

End Function

I run this function using the RunCode command in a macro. The macro is run
from the command line and opens the form and displays a specific record. It
displays the correct record but setting that are done by the Form_current
procedure are not set unless I click the next or previous buttons.
I need to run the Form_Current procedure so that t he current record is
displayed properly.

can anyone help?

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net