Recent content by lawsonta

  1. L

    Recordset Cursor and Lock Type

    I have a Access 2000 database that is linked to some tables on a SQL 2005 Express database (over a VPN connection). I am pulling down a subset of records to a Access table, then updating a field in the SQL database (I am going to set it up to only pull 10 to 25 records at a time, every 30/60...
  2. L

    Get id of record just added

    Okay I got it I guess...there may be an easier way... I set up another recordset to pull the max id as it loops through the first recordset. Dim conn As ADODB.Connection Dim rst As New ADODB.Recordset Set conn = CurrentProject.Connection rst.Open "Select MAX(TransactionID)...
  3. L

    Get id of record just added

    I have a function that inserts a record into a table after pulling the info from a ADO recordset. This works fine. My question is, is there a way to determine the id of the record just added, so I can use it for the second batch of code.... In the Transactions table, there is a AutoNumber...
  4. L

    Check table to see if record exists, if not -INSERT

    Sweet, thanks guys! To finalize the post, below is what I decided to go with: Dim rsc As New ADODB.Recordset rsc.Open "Select * from Customer WHERE Name ='" & clname & "'", CurrentProject.Connection, adOpenKeyset, adLockOptimistic If rsc.EOF Then DoCmd.RunSQL "Insert INTO...
  5. L

    Check table to see if record exists, if not -INSERT

    P.S. enjoy the wine and speghetti!!!!
  6. L

    Check table to see if record exists, if not -INSERT

    Urgg....I should have gotten that. Bad thing about having access to a help center like this is it is hard to push yourself when there are so many helpful (and more knowledgeable people) out there. Thanks so much! Below is as far as I got with the Dlookup (just in case someone else out there...
  7. L

    Help Reading in Query and Setting to Variables

    My experience in Quickbooks is now going on 1 to 2 weeks. But by the time I get done, I may deem myself an expert for sure. Without finding that QODBC driver, I would have been screwed. I think I'm going to research the Dlookup or Dcount option, or at best take a break. I am confusing myself...
  8. L

    Check table to see if record exists, if not -INSERT

    This is followup to my post on how to insert invoices into Quickbooks. I have a custom Access database/application that is linked to some Quickbooks tables using the QODBC driver. I need a way to check to see if a record already exists in in Quickbooks table, Customer. If it does not, I...
  9. L

    Help Reading in Query and Setting to Variables

    With Quickbooks, you have to insert all the child records first and then you can insert the parent record (the main record). I guess we could have flip flopped the logic a bit and got it to work. Mine looked kinda like that but obviously I did something wrong. If I get this customer thing...
  10. L

    Help Reading in Query and Setting to Variables

    After seeing the two recordsets below you may understand why I decided to go this way. Very possible my logic was off on the variable solution! Very possible my logic is off below too, but its all I got, lol.... Public Function RUN_INVInsert() Dim invoiceitemid As String, custid As...
  11. L

    Help Reading in Query and Setting to Variables

    Thanks for your help!! I tried setting it to a variable but it didn't work 100%. I have some invoices that could have 1 line item and some that have multiple so I could never get the compare to work with 100% certainty. However, I did follow your advice with the 2nd recordset loop inside the...
  12. L

    Help Reading in Query and Setting to Variables

    The recordset pulls all the needed information - for both the invoiceline table and the invoice table (the header info). It is the same query that I use to print the actual invoices via a report in Access. Attached is some sample data from running qryInvoicing_04, which is what my recordset is...
  13. L

    Help Reading in Query and Setting to Variables

    Okay, this is the function looks like so far. When the function runs I need to insert multiple invoices that have multiple line items each. It is not working completely right now. Unfortunatley, it is creating a separate invoice for each line item (hope that makes sense). It should look like...
  14. L

    Help Reading in Query and Setting to Variables

    Thanks!!!! Okay, this is what my Quickbooks insert looks like using variables from my various queries.... it works for the most part, I still need to add some type of loop or something. It is only importing the first invoice into Quickbooks at the moment, when there are multiple ones that need...
  15. L

    Help Reading in Query and Setting to Variables

    Ultimate Goal: Import Custom Access invoices to Quickbooks I have been able to successfully utilize the QODBC driver and link some Quickbooks tables to my Access application. The Quickbooks tables I have linked are 'Invoice' and 'InvoiceLine'. I have been able to manually import invoices...
Back
Top Bottom