1.

Solve : Type mismatch error VB8?

Answer»

This is my code

Private Sub Check1_Click()
Dim a1
a1 = Check1.Value
Text5 = ""
Text5.text = a1

End Sub

When I click on the check1 a "1" is placed in text5. However when I rerun the program the "1" is gone, it's not written to the DATA field assigned to text5. If I manualy type a "1" in text5 I get a type mismatch error when exiting the program. What am I doing wrong. I have also tried writing it like this.

Private Sub Check3_Click()
Text7 = ""
Text7.SelText = Check3
End Sub

I get the same problems

Never mind I found it ( couldn't delete message )Quote from: Honsolo on March 01, 2009, 03:04:28 PM

Never mind I found it ( couldn't delete message )

Do share.
wow, such intuitive control names... Check1, text5, text7...

If text5 was bound to a data SOURCE then the recordset would need to be commited to see a CHANGE in the resulting file.

And if it wasn't bound at all then controls revert to their design time state when the program is run.What do you mean? I always call my variables Variable1 Variable2 Variable3 etc. Once I got up to Variable2377. That was a real big program.
pah, numbers? what about
Code: [Select]variabletwothousandthreehundredseventyseven +=variabletoaddtovariabletwothousandthreehundredseventyseven;
Now that's what I call programming. By the way, do you agree that arrays are for wimps?
pah, Arrays. Arrays are for wimps, definitely. Why, these kids today, with their fancy "arrays" and their Silly "objects" and "Frameworks". Fiddlesticks, I say why, they cheat at Quicksort by using these "arrays", real quicksort means to iteratively sort properly named variables, none of this arySort() business. no sir, real sorting algorithms look like this:

Code: [Select]Public Sub SortValues(A as Integer, B as Integer, C as Integer, _
E as Integer, F as Integer, G as Integer, _
H as Integer, I as Integer,J as Integer, K as Integer, _
L as Integer, M as Integer,N as Integer, O as Integer, P as Integer, _
Q As Integer, R as Integer, S as Integer, T As Integer, U As Integer, V as Integer, _
W as Integer, X as Integer, Y as Integer, Z as Integer)
Which should sort the 26 values passed. Of course wimpy programmers will whine "but what if I want to sort more then 26 values"

Then you are too picky! there is no reason to sort more then 26 letters since there can only be 26. And of course they go on, "and why must it be integer" PAH to you newbies and your fancy "Arrays" and your "Data types" Integer is a mans data type, use LONG and you MUST be compensating for SOMETHING, and if you use a "String" type you may as well lay claim to a wet noodle. No Sir, just Integer, and Byte, for the hardcore.WOW !!!!!! I can't believe how much flame I got for this post. It was an example of what I was doing. I AM NOT A PROGRAMMER. I wrote in VB4 many years ago. Now I need a complex program for the company I work for. I am writing it because no one else offers it. Besides I'm a company man. I have never had any schooling and I am doing my best.

GIVE ME A BREAKwe're not flaming you...


Discussion

No Comment Found