Recent content by AJR

  1. A

    Odd Behaviour of Int() in Function

    Funny how often problems stand on assumptions. I said that Currency type always displays the $ symbol because it does. In a report or form where the control is formatted as Currency. It never occurred to me that I could format the table field as Currency and the report control as something...
  2. A

    Odd Behaviour of Int() in Function

    Hi I am writing a financial database that tracks Stocks, Bonds and Cash in several currencies. To do this I have a table with a record for each transaction that includes a field for [Quantity]. I have another table with [CurrentValue] for each asset. Both of these are number - Double - 4...
  3. A

    Two Similar SQL select queries. Why does one not work?

    BoerBende Thanks -Sometimes the obvious stuff is the hardest to see. A/R
  4. A

    Good book to learn vba, sql and recordsets

    jDraw Sorry it took me so long to respond. Thanks a lot for the suggestions. I am, unfortunately, dealing with ultra slow internet here, but I am dying to have a look at that stuff when I get into Broadband country A/R
  5. A

    Two Similar SQL select queries. Why does one not work?

    Hi. I need to check if a recordset is empty. I did this once before, with much help from this forum, using the following SQL: sqlstr = "SELECT [fxXRate] FROM tblFXRates " & _ "WHERE fxDate= #" & dtSetDate & "# AND fxCurrency ='" & strCur & "'" Adapting this to my new, even...
  6. A

    Object Required Error Checking for Empty Recordset

    O.K. Got it. After getting the "Too Few Parameters" error I tried copying the SQL generated by the Debug.Print statement back into the Query Grid as SQL. That showed the problem to be the reference to the Selected field, which I had referenced as tblFXRates.fxXrate. The spelling of...
  7. A

    Object Required Error Checking for Empty Recordset

    Hi Arnegp Thanks for the suggestion. I tried that and now I get a different error. "Too Few Parameters expected 1" A/R
  8. A

    Object Required Error Checking for Empty Recordset

    Hi Still haven't gotten it sorted. When I run this with debug.print I get: SELECT fxXRate FROM tblFXRates WHERE fxDate=#02-17-2016# AND fxCurrency ='CAD' If I paste that into the query Grid as SQL it works fine. So, I'm really not understanding why I am getting the Object Required error...
  9. A

    Object Required Error Checking for Empty Recordset

    Hi I tried the following but am still getting the "Object Required" error on the line: Set rst = db.OpenRecordset(sqlstr) 'Check if Query for FX is empty i.e.,No exchange rate in table for this currency on this date Dim rst As Recordset Dim sqlstr As String sqlstr = "SELECT fxXRate...
  10. A

    Object Required Error Checking for Empty Recordset

    CJ_London and JHB Thanks. I think I actually get all that. I was using a form I made, from instructions by allen browne, that translates SQL to VBA and then trying to use it in SQL--Duuhh. That's also why the Carriage Return stuff is there. I'll get at this right away. This form's module...
  11. A

    Object Required Error Checking for Empty Recordset

    Hi I am soooooo close to getting this data entry form complete. The Database keeps track of transactions in bank accounts with differing currencies. The exchange rate between currencies is recorded in tblFXRates and I have to check, before adding a record to tblTransactions, using the data...
  12. A

    Good book to learn vba, sql and recordsets

    Hi After a couple of years of struggling I am getting pretty comfortable with basic Tables, Reports, Forms and Queries. I could really use a book that explains using VBA, SQL and Recordsets in Access. Any suggestions? Many thanks, as always. A/R
  13. A

    Function To Return Result of a Query

    Guus2005 That worked quite nicely. Thanks Again A/R
  14. A

    Function To Return Result of a Query

    Guus2005 Thanks for the comment I don't actually know what a "one liner" is and I'm not sure what "The first one" refers to. Forgive my inexperience. I noted that I included one line twice (commented). That was a leftover from an attempt to get it to work. I will try your suggestion and see...
  15. A

    Function To Return Result of a Query

    Hi I'll try and explain this in a simplistic way as I tend to overcomplicate my questions. I think my problem will be revealed quite readily by the code. I am trying to assign the result of a query to a variable so I can use it in a formula. From what I can gather this is possible by way of...
Top Bottom