DoCmd.OpenForm "makemodq1L"
DoCmd.Close acForm, "makemodq1L"
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)
"John Baker" <Baker.JH@Verizon.net> wrote in message
news:56tn90hm5qt7445o91hrjnr0glbvtavale@4ax.com...[color=blue]
> Hi:
>
> Based on advice from this group I am attempting to run a form with a query[/color]
base that calls[color=blue]
> for variable input (a few letters of the associates last name). Howevere,[/color]
when the user[color=blue]
> clicks on "cancel", I want to close the form and continue in the macro[/color]
that called the[color=blue]
> form.
>
> I am a total neophyte with VB, and have developed the following code:[/color]
(makemodq1L is the[color=blue]
> form in question)
>
>
> Public Function MODASS()
> On Error GoTo skipout
> DoCmd.OpenForm Form = "[makemodq1L]"
> GoTo stopit
>
> skipout:
> DoCmd.Close acForm = "[makemodq1L]"
>
> stopit:
> End Function
>
>
> There is something badly wrong with the syntax in the DoCmd lines, and i[/color]
don't know what[color=blue]
> it is. Can someone give me a fix to this?
>
> Thanks
>
> John Baker[/color]