Re: Inventory Database
From: Larry Daugherty (Larry.NoSpam.Daugherty_at_verizon.net)
Date: 02/23/05
- Next message: Heather: "Re: Automatically updating Tables"
- Previous message: ld: "Link to dbf file requires selecting an index"
- In reply to: Connie Wickam via AccessMonster.com: "Inventory Database"
- Next in thread: Connie Wickam via AccessMonster.com: "Re: Inventory Database"
- Reply: Connie Wickam via AccessMonster.com: "Re: Inventory Database"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Feb 2005 12:50:04 -0800
Hi Connie,
How I would solve the issue:
Create an option group on the Sales form with 4 option buttons or a combobox
with a list of 4 items: Unsold, Consecutive, Even, Odd. You might include
a date field to indicate the day the unit actually sold. What ever the
mechanism, call it SalesStatus.
Thereafter, I would refer to the value of SalesStatus in the main record and
calculate the availability for reports, etc. by using a Select --- Case
statement and put the code into a function procedure in a general module
that you call from your query.
Private Function Availability(SalesStatus as string) as string
Select SalesStatus
Case Unsold
Availability = "Available"
Case Consecutive
Availability = "Unavailable"
Case Even
If format(Date,"YYYY") mod 2 =0 then
Availability = "Unavailable"
Else
Availability = "Available"
End If
Case Odd
If format(Date,"YYYY") mod 2 =0 then
Availability = "Available"
Else
Availability = "Unavailable"
End If
End Select
Change the return value to be words that fit your application. Always
calculate the results when you need them rather than save them in the
database. The above is all "air" code so your mileage may vary. If you
want to show only the available units then, I'd create a new field in my
query: UnitsAvail: =Availability(SalesStatus) Down in the criteria line
put "Available" and you will see only those units that are available this
year.
HTH
-- -Larry- -- "Connie Wickam via AccessMonster.com" <forum@AccessMonster.com> wrote in message news:d49c36fbc40949e094d9ba5381db1d6e@AccessMonster.com... > I am working on creating a timeshare sales and inventory database. I am > having difficulty with the inventory. The problem is that one unit could > be sold either by odd years, even years or consecutive years. If a unit is > sold for consecutive years then I need it to be removed from the available > inventory, if a unit is sold for either odd or even years I need the > opposite year to stay in available inventory and consecutive would not be > an option. > > Does anyone have any ideas on how to do this the simpliest way. > > -- > Message posted via http://www.accessmonster.com
- Next message: Heather: "Re: Automatically updating Tables"
- Previous message: ld: "Link to dbf file requires selecting an index"
- In reply to: Connie Wickam via AccessMonster.com: "Inventory Database"
- Next in thread: Connie Wickam via AccessMonster.com: "Re: Inventory Database"
- Reply: Connie Wickam via AccessMonster.com: "Re: Inventory Database"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|