Arg81
Well-known member
Hi All,
It's been a while since I've been on here, haven't really been upto much development....
Here's my problem. I'm asking the user for a simple input via a messagebox.
My code is:
When I press the load button after entering the ID number into the textbox,
I get an error message of ;
Enum argument value 64 is not valid for buttons. buttons should be a value from DialogResult.
Parameter name: buttons
Basically what I am trying to do is create a form to allow the user to change a status of a record.
Once loaded, I want to inform the user via messagebox what the status currently is, and if they press OK, then it changes the Status, and if they press cancel then it resets the form.
Thanks for any info,
Regards
Luke
It's been a while since I've been on here, haven't really been upto much development....
Here's my problem. I'm asking the user for a simple input via a messagebox.
My code is:
VB.NET:
[SIZE=2][COLOR=#0000ff][SIZE=2]DsSearchDWR1.DWR.Clear()
daDWR.SelectCommand.Parameters("@DWRNumber").Value = txtDWRNumber.Text
daDWR.Fill(DsSearchDWR1)
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] DsSearchDWR1.DWR.Rows.Count > 0 [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] lblStatusID.Text = "1" [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]lblStatus.Text = "Active"
[/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2]lblStatus.Text = "Complete"
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2]MessageBox.Show("DWR Not Found!")
txtDWRNumber.Text = ""
txtDWRNumber.Focus()
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] lblStatusID.Text = "2" [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] MessageBox.Show("DWR No " & txtDWRNumber.Text & " is currently set to COMPLETE, are you sure you want to change this status to ACTIVE?", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) = MessageBoxButtons.OK [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]'Do This & Do That[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End If[/COLOR][/SIZE]
When I press the load button after entering the ID number into the textbox,
I get an error message of ;
Enum argument value 64 is not valid for buttons. buttons should be a value from DialogResult.
Parameter name: buttons
Basically what I am trying to do is create a form to allow the user to change a status of a record.
Once loaded, I want to inform the user via messagebox what the status currently is, and if they press OK, then it changes the Status, and if they press cancel then it resets the form.
Thanks for any info,
Regards
Luke