What am I doing wrong? I have the following code. Me!FSCRate is a control on my form. When I debug, rsFSC!Rate has a value but it is not getting put into Me!FSCRate. Why?
Dim rsFSC As New ADODB.Recordset
Dim SQLStmt As String
SQLStmt = "SELECT * FROM tblRates WHERE CustNumber = " & Forms![frmInvoice]![BillToNumber]
rsFSC.Open SQLStmt, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
If Not rsFSC.EOF Then
Me!FSCRate = rsFSC!FSCRate
is FSCRate also a fieldname in the form's recordsource? maybe Access trying to put it into the recordsource field, instead of the control? what hapens when you assign a constant value to me!FSCRate in the code? like:
Ok, It's getting closer. When I assigned 123, it worked...so I tried to assign .025 which is the rate that is supposed to be coming in, and that DIDN'T work so it's something with the decimal. I then said
Me!FSCRate = .025 * 100 and 200.0000 is what displayed in my field. I then tried Me!FSCRate = rsRates!FSCRate * 100 and I get 200.00 (if I say * 1000, I get 2500) What I want is 2.5!!!
The format is percent (and I know that acts wierd in Access).
make sure FSCRate field in your table is not long integer. it should be either double or currency field. if it is an integer field, it will round the percentage which is supposed to be after decimal.