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...
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...
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
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...
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...
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...
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...
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...
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...
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
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...
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...