Thanks. I'll keep plugging away. SQL pane says:
Compile error, Variable not yet created in this context
I defined the currentweight variable so I'm not sure what exactly it's talking about
No. Keep getting same error messages as before. Depending on how I arrange code keep getting:
No value given for one or more required parameters
Or
Run time Error - The select statement includes a reserved word or an argument name that is mispelled or missing, or the...
Tried this way also and didn't work
stSql = "SELECT Sum([TransferredWeight]) - Sum(Weight) From tblLatexBatchQC, [Blendsheet Output] AS currentweight"
stSql = stSql & " WHERE tblLatexBatchQC.[TankNum] = [Blendsheet Output].TankN" & Me.cmbTankNum & ""
Set rs =...
Can someone please let me know why this isn't working? I'm trying to take the difference of two fields from two separate spreadsheets. I believe it's only reading from the first spreadsheet (tlbLatexBatch QC) and not the other. Any help would be greatly appreciated.
Dim con As Object...
Thanks for the help. I tried that and now I get another message saying no value given for one or more parameters. Haven't had a chance to play with it yet to figure out why. I'm guessing something missing in my table or a problem with one of my variables.
Once again I'm stuck. Shocker. I'm trying to take data from multiple tables and Sum them. I think what I have should work, but I keep getting a runtime error 2465 saying the field "'" can't be found. Do I need to do a join statement? Help is appreciated. Thanks
Dim con As Object
Dim...
I gave up on this some time ago but revisited it recently and with some help got the solution. The problem was that the Dcount function does not read Null values; it skips over it. The following finally worked:
Dim i As Integer
i = DCount("*", "[Blendsheet Input]", "TankNum ='" &...
Hi. Any help would be greatly appreciated. I'm trying to query my database for the most recent record for a tank specified by the user on a form. I have an If then statement based on that query as shown below:
If DCount("LotNum", "[Blendsheet Input]", "TankNum ='" & Me.cmbTankNum & "'") =...
Yes the same TankNum can be displayed for multiple rows in the table and that's the problem. Ultimately, I want the correct text to be displayed if any "LotNum" field value associated with a specific TankNum does not contain a text (or is null). I originally tried:
If [LotNum] = Null Then...
Thanks for Help! The "If rs![LotNum] = True Then" statement kind of worked. However now it seems that even though the value is "True" in a couple scenarios, the correct If statement isn't executed.
I am running this code from a form in access (running query in form). I can not add the...
Hi All,
What I'm trying to do seems simple enough yet I can't get it to work. I am querying a database and I want a text to display based on my IF Then statement. However, it seems as though my select query is only reading my most recent value in my table instead of the select values...
Thanks for the help.
I'm getting the message on the line:
stSql = stSql & " WHERE [TankNum] = '" & cboTankNum.Value & "'"
I tried changing to rs![LotNum] but didn't work. I think it may have something to do wit the way I'm defining the variable "lotn" but i'm not sure
Thanks in advance for any help. I'm trying to do something that should be simple enough but it's not working. I'm trying to display a text in a field based on a select query. If a value exists in a field in my database (LotNum in Blendsheet input), then i want my text box on a form to say...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.