Click to See Complete Forum and Search --> : data type
smh
Nov 8th, 2000, 10:31 AM
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
paulw
Nov 8th, 2000, 10:56 AM
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.
smh
Nov 8th, 2000, 11:08 AM
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!)
paulw
Nov 8th, 2000, 06:32 PM
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.
smh
Nov 9th, 2000, 08:14 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
paulw
Nov 9th, 2000, 09:35 AM
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.
smh
Nov 9th, 2000, 10:39 AM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.