Access forms (1 Viewer)

sree

Registered User.
Local time
Yesterday, 20:51
Joined
Mar 25, 2009
Messages
17
I created a table with the following fields

Cust Id :
Date paid :
Instalment :
(here for instalment i assign list box "FIRST","SECOND","THIRD"..)

I called these fields to form for entry view. Here my question is:
in form entry view, if the customer paying the "SECOND" instalment, at time it should accept only "SECOND" for the same customer, because he paid already "FIRST", if the customer is paying "THIRD",should not accept "FIRST" & " SECOND"

please give me a solution for this

Advance thanks
 

MarkK

bit cruncher
Local time
Yesterday, 20:51
Joined
Mar 17, 2004
Messages
8,186
The thing is, if you design a system that only lets you enter the correct payment number, then you don't need to enter the payment number because the system can figure it out on it's own, in which case you should not enter the payment number.
Look into the DCOUNT() function to find out the next payment number...
Code:
DCount("*", "YourTable", "CustID = " & someID)
Or open a recordset ordered by date for any CustID...
Code:
Set rst = currentdb.OpenRecordset( _
  "SELECT Field " & _
  "FROM Table " & _
  "WHERE CustID = " & someID & " " & _
  "ORDER BY PaidDate;")
And the first record is payment 1, etc...
 

sree

Registered User.
Local time
Yesterday, 20:51
Joined
Mar 25, 2009
Messages
17
Thank you very much:)
 

Users who are viewing this thread

Top Bottom