Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 12th, 2005, 11:37 PM
John Baker
Guest
 
Posts: n/a
Default VB Command Syntax

Hi:

Based on advice from this group I am attempting to run a form with a query base that calls
for variable input (a few letters of the associates last name). Howevere, when the user
clicks on "cancel", I want to close the form and continue in the macro that called the
form.

I am a total neophyte with VB, and have developed the following code: (makemodq1L is the
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 don't know what
it is. Can someone give me a fix to this?

Thanks

John Baker
  #2  
Old November 12th, 2005, 11:37 PM
Douglas J. Steele
Guest
 
Posts: n/a
Default Re: VB Command Syntax

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]


  #3  
Old November 12th, 2005, 11:38 PM
John Baker
Guest
 
Posts: n/a
Default Re: VB Command Syntax

Thanks

John Baker
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles