Hi Giant vb Coders
Here is an attached file , I would appreciate that you download it coz it's color-enhanced so it will be easy job for you to solve this silly bug .
Thanx a lot for your time and sleep well programmers ;)
Printable View
Hi Giant vb Coders
Here is an attached file , I would appreciate that you download it coz it's color-enhanced so it will be easy job for you to solve this silly bug .
Thanx a lot for your time and sleep well programmers ;)
I can't see any1 here tried to solve this ****in peice of code .Did you get frustrated too , Didn't you ?
I don't believe that !
Hey Programmers you'd written the most complicated app and you don't have that tricky way to solve this !!
this may give others courage to try ;)
lol, I'm not here that often but let's see..
---
Ok, I found this in the doc:
VB Code:
Public Function SaveToRec(Frm As Form, txtbox As TextBox, FieldName As String) Call clss.SaveToRec("Field_one", Form1, Text1.Text)
As you can see the function SaveToRec wants a Form then a TextBox and a String as parameters.. you're giving it a String a Form and another String so this surely won't work. Try this:
VB Code:
Call clss.SaveToRec(Form1, Text1, "Field_one")
Didn't try or read the rest, I have to do other things :p
thanx fox for this superfast reply ,lol
anyway, I used
Call clss.SaveToRec(Form1, Text1.Text, "Field_one")
as you said , but I got error says:
"type mismatch"
Text1.Text
C Ya
I said: Call clss.SaveToRec(Form1, Text1, "Field_one")
that's didn't work !!
any other option plz fast .
thanx Fox
There's no reason to pass the form and textbox, just pass the text in the textbox:
Public Function SaveToRec(sText As String, FieldName As String)
and call it like this:
Call clss.SaveToRec(Text1, "Field_one")
change this function:
VB Code:
Public Function SaveToRec(Frm As Form, txtbox As TextBox, FieldName As String) Rec.AddNew Rec.Fields(FieldName) = Frm.txtbox Rec.Update MsgBox "Finished writing to DB", vbOKOnly, "Done" End Function
to:
VB Code:
Public Function SaveToRec(txtValue As String, FieldName As String) Rec.AddNew Rec.Fields(FieldName) = txtValue Rec.Update MsgBox "Finished writing to DB", vbOKOnly, "Done" End Function
and then call the function like so:
VB Code:
Call SaveToRec (Text1, "Field_One")
Whoa! Thats exactly what i said, but i guess you posted it while i was typing my post :)Quote:
Originally posted by Machaira
There's no reason to pass the form and textbox, just pass the text in the textbox:
Public Function SaveToRec(sText As String, FieldName As String)
and call it like this:
Call clss.SaveToRec(Text1, "Field_one")
Thanx a lot Fox, MoMad , Machaira now vb world has just started with me, I can fire on .
:D
by the way this call never solve the problem :
Call clss.SaveToRec(Form1, Text1, "Field_one")
thanx again Giants:eek: