Hi
i have a mdb table in which i want to access the data from mdb table into new table i,e Operator but the condition is if the data in first row of column say "operator_c ode" is "alfred" . The name alfred is inserted into operator
OK
and when i move to the next row in the column i,e "operator_c ode"
lets assume it is empty in that case the value of previous row i,e "alfred" must be inserted into the empty row
i create a loop but it is not working for empty record
[code=vb]
For reccount = 1 To rsmaster.Record Count
If Not IsNull rsmaster.Fields ("Yp1VOp") Then
YpVcode = rsmaster.Fields ("Yp1VOp")
squery = "insert into operator values( ' " & YpVcode & " ' )"
dbmaster.Execut e (squery)
Else
squery = "insert into operator values( ' " & YpVcode & " ' )"
dbmaster.Execut e (squery)
End If
rsmaster.MoveNe xt
Next[/code]
please give me help
best regards
varinder
i have a mdb table in which i want to access the data from mdb table into new table i,e Operator but the condition is if the data in first row of column say "operator_c ode" is "alfred" . The name alfred is inserted into operator
OK
and when i move to the next row in the column i,e "operator_c ode"
lets assume it is empty in that case the value of previous row i,e "alfred" must be inserted into the empty row
i create a loop but it is not working for empty record
[code=vb]
For reccount = 1 To rsmaster.Record Count
If Not IsNull rsmaster.Fields ("Yp1VOp") Then
YpVcode = rsmaster.Fields ("Yp1VOp")
squery = "insert into operator values( ' " & YpVcode & " ' )"
dbmaster.Execut e (squery)
Else
squery = "insert into operator values( ' " & YpVcode & " ' )"
dbmaster.Execut e (squery)
End If
rsmaster.MoveNe xt
Next[/code]
please give me help
best regards
varinder
Comment