N
Nur Muhammad
Dear Friend:
I use a table, name ChqInfo that store data like ChqID (PK), ClientID ( FK),
ChqNo, Chq ReplacementDate. and another table, name Cumtomer Info, store date
like ClientID, ClientName, RepamentDate., Installment
I have also a form, name Frminput.
From this form I will entry ClientID, RepamentDate, Installment, FirstChqNo.
Now i want the result like the following condition:
ChqID ClientID ChqNo Chq ReplacementDate
1 101 12501 02/20/2008 (Mm-DD-YYYY)
2 101 12502 03/20/2008
3 101 12503 04/20/2008
4 101 12504 05/20/2008
5 101 12505 06/20/2008
6 101 12506 07/20/2008
7 101 12507 08/20/2008
8 101 12508 09/20/2008
9 101 12509 10/20/2008
10 101 12510 11/20/2008
11 101 12511 12/20/2008
12 101 12512 01/20/2009
13 101 12513 02/20/2009
14 101 12514 03/20/2009
15 101 12515 04/20/2009
I use the following code but date series is not update
Private Sub Command21_Click()
Dim ClientID, ChqID, Num, ChqNo, ChqCount As Integer
Dim ddate, dm, xxx, xx As Date
ClientID = Me.client_id
ChqCount = Me.car_sanction_tenor
Num = Me.car_chq_no
ddate = CDate(Me.car_disburse_date)
dm = DateAdd("m", 1, ddate)
DoCmd.RunSQL " Delete * from TblChqNo"
For ChqID = 1 To ChqCount
ChqNo = Num + ChqID
xxx = CDate(Format(dd - mm - yyyy, dm))
xx = xxx
DoCmd.SetWarnings False
If ChqID > ChqCount Then Exit For
DoCmd.RunSQL "Insert Into TblChqNo (ChqClientID, ChqNo, ReSchedule) values (
" & ClientID & " , " & ChqNo & " , " & xx & " )"
Next ChqID
DoCmd.SetWarnings True
DoCmd.OpenTable "TblChqNo"
End Sub
I use a table, name ChqInfo that store data like ChqID (PK), ClientID ( FK),
ChqNo, Chq ReplacementDate. and another table, name Cumtomer Info, store date
like ClientID, ClientName, RepamentDate., Installment
I have also a form, name Frminput.
From this form I will entry ClientID, RepamentDate, Installment, FirstChqNo.
Now i want the result like the following condition:
ChqID ClientID ChqNo Chq ReplacementDate
1 101 12501 02/20/2008 (Mm-DD-YYYY)
2 101 12502 03/20/2008
3 101 12503 04/20/2008
4 101 12504 05/20/2008
5 101 12505 06/20/2008
6 101 12506 07/20/2008
7 101 12507 08/20/2008
8 101 12508 09/20/2008
9 101 12509 10/20/2008
10 101 12510 11/20/2008
11 101 12511 12/20/2008
12 101 12512 01/20/2009
13 101 12513 02/20/2009
14 101 12514 03/20/2009
15 101 12515 04/20/2009
I use the following code but date series is not update
Private Sub Command21_Click()
Dim ClientID, ChqID, Num, ChqNo, ChqCount As Integer
Dim ddate, dm, xxx, xx As Date
ClientID = Me.client_id
ChqCount = Me.car_sanction_tenor
Num = Me.car_chq_no
ddate = CDate(Me.car_disburse_date)
dm = DateAdd("m", 1, ddate)
DoCmd.RunSQL " Delete * from TblChqNo"
For ChqID = 1 To ChqCount
ChqNo = Num + ChqID
xxx = CDate(Format(dd - mm - yyyy, dm))
xx = xxx
DoCmd.SetWarnings False
If ChqID > ChqCount Then Exit For
DoCmd.RunSQL "Insert Into TblChqNo (ChqClientID, ChqNo, ReSchedule) values (
" & ClientID & " , " & ChqNo & " , " & xx & " )"
Next ChqID
DoCmd.SetWarnings True
DoCmd.OpenTable "TblChqNo"
End Sub