Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I add additional rcds to a tbl that autopops the next 24 numbers?

Status
Not open for further replies.

modglin

Programmer
Apr 10, 2001
105
We have someone wanting to create a database that will record what coupon numbers she has sent to a store.
She will need to fill in the Store ID, Store Address, Date Sent and the numbers on the coupons that she sends to the store. They will always be sending in groups of 25 and the numbers will in sequential order. So if they send store #100 coupons #50-#75 on 7/12, is there a way to create a form where they will enter the Store information/date and etc and the coupon #50 and it automatically fill in the remaining numbers on a table? And then they enter Store #105 and beginning coupon #76 and it auto fills the next 25?
 
Yes, but this strikes me as rather inefficient. Since the coupon lots are always groups of 25, why not simply have a single field for the starting coupon number? And set its default value to:
Code:
=DMax("[[blue]CouponStartNumber[/blue]]", "[blue]tblMyTable[/blue]") + 25
...replace field names in blue with YOUR field names...

Ken S.
 
Or, include a field for start AND end numbers, then make the default value of the starting number:
Code:
=DMax("[CouponEndNumber]", "tblMyTable") + 1
And make the default value of the end number:
Code:
=[CouponStartNumber] + 24
Ken S.
 
Oops, you'll probably need the full form reference in the default end value:
Code:
=[Forms]![frmMyForm]![CouponStartNumber] + 24
Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top