Click here to Skip to main content
15,902,299 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Compare 2 Time Strings Pin
Tamimi - Code5-Sep-06 2:40
Tamimi - Code5-Sep-06 2:40 
AnswerRe: Compare 2 Time Strings Pin
japel5-Sep-06 2:49
japel5-Sep-06 2:49 
Questionopen folder Pin
Sasmi5-Sep-06 1:05
Sasmi5-Sep-06 1:05 
Answeropen folder Pin
Kanniah5-Sep-06 4:11
Kanniah5-Sep-06 4:11 
Questionhexa convert to bits Pin
Muad_Dib4-Sep-06 23:16
Muad_Dib4-Sep-06 23:16 
AnswerRe: hexa convert to bits Pin
progload5-Sep-06 9:26
progload5-Sep-06 9:26 
Questionlistview Daily Report! Pin
charleslau28554-Sep-06 22:10
charleslau28554-Sep-06 22:10 
Answercant show the msgbox?? [modified] Pin
campbells4-Sep-06 21:44
campbells4-Sep-06 21:44 
I having a weird problem now... all the function run correctly, but the msgboc just didnt show out... it may make my user confuse is the function been run or not.
when i test it the function just run correct, save item if there is no record of it which mean Add new record, if there is record in it then dont perform anything.


Do
On Error Resume Next
temp = rs![custNO]
rs.MoveNext
Loop Until (rs.EOF)

If ccustno.Text <> rs![custNO] Then
rs.AddNew 'Add detail to record
rs.Fields("CustNo") = ccustno.Text
rs.Fields("Customer") = UCase(ccus.Text)
rs.Fields("Area") = UCase(carea.Text)
rs.Fields("Address") = UCase(caddress.Text)
rs.Fields("Tel") = cphone.Text
rs.Fields("Fax") = cfax.Text
rs.Fields("Name") = UCase(cattn.Text)

rs.update 'update u record
rs.MoveFirst
MsgBox ("Customer Information Recorded")

Else: MsgBox ("Customer already been create, please use the UPDATE function for update"): Exit Sub
End If
---


i have edit the code, it works well now Smile | :)
'move the return the database at first data if not it will have no current record error
'using DO loop to set the value to temp then compare it again and perform action with another ifelse outside the loop.
rs.MoveFirst <br />
Do<br />
If ccustno.Text <> rs![custno] Then<br />
ElseIf ccustno.Text = rs![custno] Then<br />
temp = rs![custno]<br />
End If<br />
rs.MoveNext<br />
Loop Until (rs.EOF)

<br />
If ccustno.Text <> temp Then<br />
....

-- modified at 22:52 Tuesday 5th September, 2006
AnswerRe: cant show the msgbox?? Pin
Guffa4-Sep-06 22:08
Guffa4-Sep-06 22:08 
GeneralRe: cant show the msgbox?? Pin
campbells4-Sep-06 22:15
campbells4-Sep-06 22:15 
GeneralRe: cant show the msgbox?? Pin
Guffa5-Sep-06 6:29
Guffa5-Sep-06 6:29 
GeneralRe: cant show the msgbox?? Pin
campbells4-Sep-06 22:40
campbells4-Sep-06 22:40 
AnswerRe: cant show the msgbox?? Pin
Guffa5-Sep-06 6:35
Guffa5-Sep-06 6:35 
AnswerRe: cant show the msgbox?? Pin
S Douglas4-Sep-06 23:22
professionalS Douglas4-Sep-06 23:22 
AnswerRe: cant show the msgbox?? Pin
FeRtoll5-Sep-06 11:59
FeRtoll5-Sep-06 11:59 
AnswerRe: cant show the msgbox?? Pin
Guffa5-Sep-06 19:01
Guffa5-Sep-06 19:01 
GeneralRe: cant show the msgbox?? [modified] Pin
campbells5-Sep-06 20:24
campbells5-Sep-06 20:24 
QuestionCrystal Report Components for Deployment Program Pin
FriendlySoluations4-Sep-06 21:27
FriendlySoluations4-Sep-06 21:27 
AnswerCrystal Report Components for Deployment Program Pin
Kanniah5-Sep-06 4:48
Kanniah5-Sep-06 4:48 
GeneralRe: Crystal Report Components for Deployment Program Pin
Charles Wolfe6-Sep-06 2:04
Charles Wolfe6-Sep-06 2:04 
QuestionIs it possible to launch sub without autopostback in DDL? Pin
ii_noname_ii4-Sep-06 21:05
ii_noname_ii4-Sep-06 21:05 
AnswerRe: Is it possible to launch sub without autopostback in DDL? Pin
Parwej Ahamad4-Sep-06 21:19
professionalParwej Ahamad4-Sep-06 21:19 
AnswerRe: Is it possible to launch sub without autopostback in DDL? Pin
ii_noname_ii4-Sep-06 21:46
ii_noname_ii4-Sep-06 21:46 
GeneralRe: Is it possible to launch sub without autopostback in DDL? Pin
Dave Sexton4-Sep-06 22:03
Dave Sexton4-Sep-06 22:03 
GeneralRe: Is it possible to launch sub without autopostback in DDL? Pin
ii_noname_ii4-Sep-06 22:28
ii_noname_ii4-Sep-06 22:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.