L
laavista
I have two tables; t_HK and t_Reserv. Using a "do while not EOF", I want to
go to the first record in HK_active and the first record in Reserv_active and
update each table from a value in the other table.
goto 1st record in t_HK
goto 1st record in t_Reserv
use field "HKNum" in t_HK and update a field in t_reserv
use field "TripsReservID" and update a field in t_HK
goto the next record in t_HK
goto the next record in t_Reserv
use field "HKNum" in t_HK and update a field in t_reserv
use field "TripsReservID" and update a field in t_HK
etc.
Right now, I'm just trying to move to the next record in each form. When
the procedure starts, I am on record 1 for both tables. Now I need to move
to the 2nd record for both tables.
DoCmd.OpenForm "f_HK"
DoCmd.OpenForm "f_Reserv"
Forms!f_HK!HKNum.SetFocus
longintHKNum = Forms.f_HK.HKNum
' at record 1 for t_HK
Forms!f_Reserv!TripsReservID.SetFocus
longintTripsReservID = Forms.f_Reserv.TripsReservID
' at record 1 for t_Reserv
Forms!f_HK!HKNum.SetFocus
DoCmd.GoToRecord , , acNext
longintHKNum = Forms.f_HK.HKNum
' stayed on record 1
Forms!f_Reserv!TripsReservID.SetFocus
DoCmd.GoToRecord , , acNext
longintTripsReservID = Forms.f_Reserv.TripsReservID
' Now at record 3 ???
Your help would be GREATLY appreciated.
go to the first record in HK_active and the first record in Reserv_active and
update each table from a value in the other table.
goto 1st record in t_HK
goto 1st record in t_Reserv
use field "HKNum" in t_HK and update a field in t_reserv
use field "TripsReservID" and update a field in t_HK
goto the next record in t_HK
goto the next record in t_Reserv
use field "HKNum" in t_HK and update a field in t_reserv
use field "TripsReservID" and update a field in t_HK
etc.
Right now, I'm just trying to move to the next record in each form. When
the procedure starts, I am on record 1 for both tables. Now I need to move
to the 2nd record for both tables.
DoCmd.OpenForm "f_HK"
DoCmd.OpenForm "f_Reserv"
Forms!f_HK!HKNum.SetFocus
longintHKNum = Forms.f_HK.HKNum
' at record 1 for t_HK
Forms!f_Reserv!TripsReservID.SetFocus
longintTripsReservID = Forms.f_Reserv.TripsReservID
' at record 1 for t_Reserv
Forms!f_HK!HKNum.SetFocus
DoCmd.GoToRecord , , acNext
longintHKNum = Forms.f_HK.HKNum
' stayed on record 1
Forms!f_Reserv!TripsReservID.SetFocus
DoCmd.GoToRecord , , acNext
longintTripsReservID = Forms.f_Reserv.TripsReservID
' Now at record 3 ???
Your help would be GREATLY appreciated.