dbTalk Databases Forums  

Argument Not Optional

comp.databases.ms-access comp.databases.ms-access


Discuss Argument Not Optional in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Megan Ruhnke
 
Posts: n/a

Default Argument Not Optional - 11-07-2011 , 01:57 PM






I have no clue what I am doing in VB but a database in Access that was
used to import files is no longer working and I hope someone can
assist me. The person who worked here before me made all of our
databases in VB, unfortunately, I'm not as computer savvy and I can't
get the import to work. I don't know if this will help but here goes:

Private Sub btnImportStart_Click()
Dim oImporter As clsImporter

If IsNull(Form!txtImportDate.Value) Then
MsgBox "Please enter an import date."
Exit Sub
End If

Set oImporter = New clsImporter
oImporter.init
oImporter.importExtractFiles
Form!txtLog.Value = Form!txtLog.Value & oImporter.log & vbCrLf
oImporter.done
Set oImporter = Nothing

Me!cmbFileDate.Requery
End Sub


That is what shows up and it's yellow over the first line that starts
with "Private.." and says Compile Error: Argument Not Optional. And
when I try to right-click on "definition" it says "Identifier under
cursor is not recognized."

Can someone help me? Thank you!

Reply With Quote
  #2  
Old   
Phil
 
Posts: n/a

Default Re: Argument Not Optional - 11-09-2011 , 03:23 AM






On 07/11/2011 19:57:21, Megan Ruhnke wrote:
Quote:
I have no clue what I am doing in VB but a database in Access that was
used to import files is no longer working and I hope someone can
assist me. The person who worked here before me made all of our
databases in VB, unfortunately, I'm not as computer savvy and I can't
get the import to work. I don't know if this will help but here goes:

Private Sub btnImportStart_Click()
Dim oImporter As clsImporter

If IsNull(Form!txtImportDate.Value) Then
MsgBox "Please enter an import date."
Exit Sub
End If

Set oImporter = New clsImporter
oImporter.init
oImporter.importExtractFiles
Form!txtLog.Value = Form!txtLog.Value & oImporter.log & vbCrLf
oImporter.done
Set oImporter = Nothing

Me!cmbFileDate.Requery
End Sub


That is what shows up and it's yellow over the first line that starts
with "Private.." and says Compile Error: Argument Not Optional. And
when I try to right-click on "definition" it says "Identifier under
cursor is not recognized."

Can someone help me? Thank you!

Have you got a Class module called ClsImporter?
Phil

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.