-
I am getting a message that I have a 'data type error in criteria expression'. In the Access database, the issuenumber is defined as an autonumber, which is a long integer. The variable gintIssueNumber is define as 'Long' in a public statement.
This is the line that is giving me the error:
rst.Open "Select * from tblLog WHERE issuenumber = '" & gintIssueNumber & " ' ", cnn
This is the code that fills 'gintissuenumber':
gintIssueNumber = cboIssue.Text
Is the '.text' giving me the problem? If so, what can I use in its place?
smh
-
This better not be a spelling problem :D
Try using CLng(cboIssue.Text) - although this should cast anyway
AND take the spaces out of your SELECT statement "'" not " ' " at the end.
If that does not work, try taking out the single quotes altogether.
Cheers,
Paul.
-
Thanks...
You are the best! I'd marry you, if I wasn't already!
I removed the single quotes and it worked.
(By the way, it REALLY wasn't my spelling...it was the interns!)
-
Blush!
I just hope you are of the female gender;)
Paul.
P.S. I'm married too and I have four kids to prove it!
P.
-
Yes I am
Yes, I am of the female gender, and I have one son too. I'm stopping at 2 though! The next one's going to be a girl I hope.
Ha!
smh
-
Hmmm. Be careful
That's how we ended up with four - two boys (three years and two years) so just one more try for girls - twin born on 4 September:D
Highly recommend it.
Cheers,
Paul.
-
If I'm lucky...
Hopefully I will be lucky. Tripletts run on my side of the family, so I may just possibly end up with 4.
Even if the next one is a boy again, I'm done... I can't even imagine how much work twins are, when my 1 is a terror himself. (And he's only 9 months old! (Just learned how to crawl and he wants to tear anything and everything apart))
Got a lot of respect for ya!
smh