Recent content by Dugantrain

  1. D

    Lotus Notes Automation

    martinjward, Thank you for your reply. Honestly, I haven't been an Access developer in years; I moved to C#, VB.Net, Sql Server a while back. I'm still glad you replied, I went ahead and had a peek at my posts from several years back for a healthy dose of entry-level nostalgia.
  2. D

    Test SQL Connection before running

    You should be able to use Error-Handling while opening your Recordset to test for error: sConn = "Provider=SQLOLEDB.1;Password=Somepw;Persist Security Info=True;User ID=Someuid;Initial Catalog=someDB;Data Source=SomeServer" sSQL = "SELECT * FROM SomeTable" on error goto errConnect...
  3. D

    Append Export to Text Doc

    You should be able to set a linked table to the text file within Access and then write an Append Query to Append to that table.
  4. D

    Problem With Unbound Forms!

    Two things: -First, I'm assuming that there is an error in your code: If Me.txtSupplier <> rstChkChg.Fields("Supplier").Value Then iChk = iChk + 1 Else: iChk = iChk + 1 End If The Else statement shouldn't be adding a 1 if the two values are equal...
  5. D

    Import Specification DOES exist... sob...

    Instead of mucking around with a previously created Import Spec, why don't you just relink the .txt file, thereby creating a new spec?
  6. D

    Runtime Error 2471 Object doesn't contain Automation object

    Where exactly is your code breaking?
  7. D

    update a field in a table from a form

    needs a space in front of "WHERE" i.e. " WHERE". Give that a try, hopefully it'll resolve your issue.
  8. D

    Populate listbox from MYSQL datasource w/o linked tables

    You can build a value list String from your Recordset object and then set the listbox rowsource equal to that String: dim strList as String Do Until rs.EOF strList=strList & rs!FirstName & ";" & rs!SurName & ";" Loop 'I believe you'll need to remove the final ";": strList=Left(strList...
  9. D

    Use of insert to put data into a table

    should be DoCmd.RunSQL "INSERT INTO Allfields (NameOfField) VALUES (" & _ fld.Name & ")"
  10. D

    Append key violation generates no error.

    I don't believe that you're going to get it to work this way as you're SetWarnings False is going to suppress the errors that you're trying to capture. You're going to need to rethink your approach; my suggestion would be to use a query to compare key values among the two tables and, if...
  11. D

    Conditionally Set an Object Variable = Nothing

    Hi all, I'm trying to release my objects in an error-handler, but only if they've been set to something. I'm trying If Not filesys = Nothing Then Set filesys = Nothing End If but it's not working. Anyone know?
  12. D

    Calculate time lapse with exclusions

    I have created a similar Module that returns a date for a specified number of business days back, although this isn't what you're needing. The problem is that I assume that you'd need to account for Holiday Dates as well as weekends so things start to get a little hairier.
  13. D

    Suggest the last

    Well, hang on...looking at your SQL, I see that you will actually get an error. You don't want your form object to be in the string (it looks like you may have copied this from the Query Builder; when you use VBA to write SQL, things are a bit different), you actually want an argument based on...
  14. D

    Suggest the last

    Your problem is that DoCmd.RunSql can only be used with Action Statements (i.e. Insert, Append, Update). Second, you're trying to assign an Action to a variable, rather than the result of that action. Assuming that your SQL is correct, you could use a DAO recordset to get this value: dim db...
Top Bottom