updating database - TechRepublic
General discussion
November 7, 2000 at 03:00 AM
csaha

updating database

by csaha . Updated 25 years, 7 months ago

Private Sub cmdNext_Click()
With mRSGrades
.MoveNext
If Len(frmGrades.txtClassID.Text) = 10 Then
frmGrades.txtCourseID.Text = Left$(frmGrades.txtClassID.Text, 7)
ElseIf Len(frmGrades.txtClassID.Text) = 9 Then
frmGrades.txtCourseID.Text = Left$(frmGrades.txtClassID.Text, 6)
ElseIf Len(frmGrades.txtClassID.Text) = 7 Then
frmGrades.txtCourseID.Text = Left$(frmGrades.txtClassID.Text, 4)
End If

If .EOF Then .MoveLast
End With
Private Sub Form_Initialize()
Set mRSGrades = deGraduation.rscdGrades

‘============ GS
If Len(frmGrades.txtClassID.Text) = 10 Then
frmGrades.txtCourseID.Text = Left$(frmGrades.txtClassID.Text, 7)
ElseIf Len(frmGrades.txtClassID.Text) = 9 Then
frmGrades.txtCourseID.Text = Left$(frmGrades.txtClassID.Text, 6)
ElseIf Len(frmGrades.txtClassID.Text) = 7 Then
frmGrades.txtCourseID.Text = Left$(frmGrades.txtClassID.Text, 4)
End If
This code works but I need to click the next button so can you haelp me with recordset setup.
Thanks
Chitra Saha

This discussion is locked

All Comments