From: Linq Adams via AccessMonster.com on 21 May 2010 14:22 "If ELookup("[WorkingDay]", "tblCalendar", "[CalDate] = " & "#" & PreviouseDate & "#") = "N" Then" ELookup() is an Excel function, not an Access function. I think there's an Excel Object reference Library you can load to use Excel functions in Access; have you done this? -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201005/1
From: iccsi on 21 May 2010 14:32 On May 21, 2:22 pm, "Linq Adams via AccessMonster.com" <u28780(a)uwe> wrote: > "If ELookup("[WorkingDay]", "tblCalendar", "[CalDate] = " & "#" & > PreviouseDate & "#") = "N" Then" > > ELookup() is an Excel function, not an Access function. I think there's an > Excel Object reference Library you can load to use Excel functions in Access; > have you done this? > > -- > There's ALWAYS more than one way to skin a cat! > > Answers/posts based on Access 2000/2003 > > Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201005/1 ELookup function is by Allen Browne see the following link. http://allenbrowne.com/ser-42.html
From: Douglas J. Steele on 21 May 2010 14:34 Are you perhaps thinking of VLookup, Linq? He's probably using Allen Browne's ELookup, a replacement to DLookup http://www.allenbrowne.com/ser-42.html -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Linq Adams via AccessMonster.com" <u28780(a)uwe> wrote in message news:a858cc09f033c(a)uwe... > "If ELookup("[WorkingDay]", "tblCalendar", "[CalDate] = " & "#" & > PreviouseDate & "#") = "N" Then" > > ELookup() is an Excel function, not an Access function. I think there's an > Excel Object reference Library you can load to use Excel functions in > Access; > have you done this? > > -- > There's ALWAYS more than one way to skin a cat! > > Answers/posts based on Access 2000/2003 > > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201005/1 >
From: Dirk Goldgar on 21 May 2010 18:04 "iccsi" <inungh(a)gmail.com> wrote in message news:7f39822c-ce55-482c-8021-fa7d0b8c8a41(a)q33g2000vbt.googlegroups.com... Private Sub ImportData() On Error GoTo Err_ImportData Dim stDocName As String Dim PreviousDate As Date PreviouseDate = Get_Previous_Business() If ELookup("[WorkingDay]", "tblCalendar", "[CalDate] = " & "#" & PreviouseDate & "#") = "N" Then Exit Sub End If If DCount("*", "tblDaily", "[Activity_date] = " & "#" & PreviouseDate & "#") = 0 And _ DCount("*", "SP APPEND DATA", "[Mydate] = " & "#" & PreviouseDate & "#") > 0 Then stDocName = "SP APPEND DATA" DoCmd.OpenQuery stDocName, acNormal, acEdit End If Exit_ImportData: Exit Sub Err_ImportData: Select Case Err Case 0 Resume Exit_ImportData Case Else strErrMsg = strErrMsg & "Error #: " & Format$(Err.Number) & vbCrLf strErrMsg = strErrMsg & "Error Description: " & Err.Description MsgBox strErrMsg, vbInformation, "Import Data" Resume Exit_ImportData End Select End Sub ===== reply begins ===== Is that a copy/paste of your code? There appears to be a typo in a variable name: > Dim PreviousDate As Date > > PreviouseDate = Get_Previous_Business() "PreviousDate" or "PreviouseDate"? I would expect the code as written to give you a compile error, unless you have the "Require Variable Declaration" option turned off (which is a bad idea). However, I don't think that would cause an error at run time, and certainly not error 0 (since that isn't an error). The error-handling in that code is set to ignore error# 0. I assume you put that there in an attempt to stop the error message from appearing. Did it work? When you get the error message, is it coming from the MsgBox in the error-handling code above -- you should be able to tell by the content, formatting, and window title -- or is it coming from someplace else? -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
From: Linq Adams via AccessMonster.com on 21 May 2010 21:17 I believe you're right, Doug! Of all the things I miss, in old age, I miss my mind the most! -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201005/1
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Buttons for multiple subforms...? Next: switch to split form from single form with code |