Jumat, 11 Mei 2018

[MS_AccessPros] SetFocus => Run-time error '438'

 

The user has a Cancel command button which closes frmVendorEdit and then
opens frmVendor (a continuous form). When frmVendor opens, I want it to
find the record based on the VendorID which was provided by
frmVendorEdit's openargs argument when that form closed. VendorID is an
autonumber field in the underlying table.

This snippet of code in the frmVendor Load event fails on
Me!VendorID.SetFocus with this error: Run-time error '438': Object
doesn't support this property or method.

   If Nz(Me.OpenArgs) <> 0 Then
      Dim varOpenArgs As Variant
      varOpenArgs = Me.OpenArgs
      Me!VendorID.SetFocus
      DoCmd.FindRecord varOpenArgs
   End If

What am I doing wrong?

Thanks, Steve

__._,_.___

Posted by: Steve thaw5 <thaw5@suddenlink.net>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar