Click here to Skip to main content
15,913,254 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: excel.sheet.setprintArea Pin
Nick Seng26-Jan-03 14:31
Nick Seng26-Jan-03 14:31 
GeneralExposing UserControl events to IE Pin
glaidler22-Jan-03 6:03
glaidler22-Jan-03 6:03 
Generalpopulating datagrid based on same field in database Pin
mcm22-Jan-03 2:01
mcm22-Jan-03 2:01 
GeneralAdding Properties at runtime in PropertyGrid Control Pin
RohanD22-Jan-03 0:53
RohanD22-Jan-03 0:53 
GeneralVB.NET : How Can i Bind data to CheckBox Pin
intibnin21-Jan-03 2:01
intibnin21-Jan-03 2:01 
Generaltype mismatch Pin
mcm20-Jan-03 10:17
mcm20-Jan-03 10:17 
GeneralRe: type mismatch Pin
SimonS22-Jan-03 3:01
SimonS22-Jan-03 3:01 
Generallooping through first row of datagrid without moving onto next Pin
mcm20-Jan-03 9:55
mcm20-Jan-03 9:55 
Here is a basic structure of my code:
Private Sub cmdConfirm_Click()
With Adodc3.Recordset
Do Until .EOF
.MoveFirst
Call Save(iOrderNo, strCode, strDesc, iQuantity, iFullPrice)
.MoveNext
Loop
End With

Function Save(iOrderNo As Integer, strCode As String, strDesc As String, iQuantity As Integer, iFullPrice As Integer) as boolean
.....validation statements and inserts
If Val(DataGrid2.Columns("Quantity").Value) > RS("Quantity").Value Then
Call BackOrder(strCode, strDesc, iQuantity)
End If
Save = True

Function BackOrder(strCode As String, strDesc As String, iQuantity As Integer) As Boolean
....validation and inserts
BackOrder = True

To step through the code briefly, when the command button is pressed, a save function is called (for each row in the datagrid), which performs the necessary validation and saves to the database, this also calls another function - BackOrder, which enters products in a backorder if necessary. I hope the information given is sufficient, and if not, please let me know. The problem occurs when the project is run, there must be something wrong with the loop as it runs through the first row twice, upon which a bug is thrown, without ever moving onto the next row...why is this - how can i make it run through all the rows? Thank you so much - any help would be greatly appreciated!
GeneralRe: looping through first row of datagrid without moving onto next Pin
Richard Deeming21-Jan-03 1:45
mveRichard Deeming21-Jan-03 1:45 
Generalquery on scrrun.dll Pin
shanksprasad19-Jan-03 18:42
shanksprasad19-Jan-03 18:42 
GeneralImort an Event from a VC++ DLL Pin
Benno Huebscher19-Jan-03 3:04
sussBenno Huebscher19-Jan-03 3:04 
GeneralUsing SourceSafe Pin
Ilan Ehrenfeld19-Jan-03 1:42
Ilan Ehrenfeld19-Jan-03 1:42 
GeneralRe: Using SourceSafe Pin
Steven Lyons20-Jan-03 13:02
Steven Lyons20-Jan-03 13:02 
GeneralAdvanced Manipulation of WAVS Pin
EmilsHere18-Jan-03 11:14
EmilsHere18-Jan-03 11:14 
GeneralCalling my custom editor Pin
Julusian18-Jan-03 7:36
Julusian18-Jan-03 7:36 
Generalcalling a function to save to a table Pin
mcm18-Jan-03 5:11
mcm18-Jan-03 5:11 
GeneralRe: calling a function to save to a table Pin
Hesham Amin19-Jan-03 9:07
Hesham Amin19-Jan-03 9:07 
Generaltab event in datagrid Pin
mcm18-Jan-03 0:02
mcm18-Jan-03 0:02 
GeneralMiddle Button scroll in combo box Pin
shaquille o'neal17-Jan-03 9:18
sussshaquille o'neal17-Jan-03 9:18 
GeneralRe: Middle Button scroll in combo box Pin
mikasa17-Jan-03 9:58
mikasa17-Jan-03 9:58 
GeneralRe: Middle Button scroll in combo box Pin
shaquille O'Neal18-Jan-03 1:48
sussshaquille O'Neal18-Jan-03 1:48 
GeneralRe: Middle Button scroll in combo box Pin
Tim McCurdy18-Jan-03 7:24
Tim McCurdy18-Jan-03 7:24 
Generallooping through rows in datagrid to save to database Pin
mcm17-Jan-03 9:00
mcm17-Jan-03 9:00 
Generalwindows services Pin
StevensN17-Jan-03 6:22
StevensN17-Jan-03 6:22 
GeneralRe: windows services Pin
Ray Cassick17-Jan-03 7:08
Ray Cassick17-Jan-03 7:08 

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.