|
-
Mar 6th, 2001, 05:26 PM
#1
Thread Starter
Addicted Member
Can you find where my error is. I don't see one. This code is from a module. The value of frmForm is a variable which pulls in the form that called the procedure. I keep getting the "Type mismatch" error on the astricked line.
rst.Open "SELECT * FROM " & strContactTable & " " & _
"WHERE '" & strComboBox & "' ='" & strComboContents & "' ;", cnn, adOpenKeyset, adLockOptimistic
'Filling in the contact Boxes
* frmForm!cboContact.Text = rst!contact
frmForm!mskPhone = rst!Phone
frmForm!txtExtension = rst!extension
frmForm!mskFax = rst!fax
frmForm!txtEmail = rst!Email
The contact field is a varchar field with a lenght of 50.
The mskPhone masked edit box has the following mask:
(___) ___ - ____
The phone field is a char field with a lenght of 16.
I do not have any problems after those two fields.
Any suggestions?
Normal is boring...
 smh 
-
Mar 6th, 2001, 05:35 PM
#2
Monday Morning Lunatic
Use
frmForm.cboContact.Text = rst!contact
The ! notation only seems to apply for recordsets.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 6th, 2001, 05:35 PM
#3
Member
Tried
= cstr(rst!contact) ?
-
Mar 6th, 2001, 05:55 PM
#4
Thread Starter
Addicted Member
The cstr() fixed the error. I also had to take the single quotes off of the 'strComboBox' variable.
Normal is boring...
 smh 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|