Re: Inventory Database

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Larry Daugherty (Larry.NoSpam.Daugherty_at_verizon.net)
Date: 02/23/05


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


Relevant Pages

  • Inventory Database
    ... I am working on creating a timeshare sales and inventory database. ... be sold either by odd years, ...
    (microsoft.public.access.gettingstarted)
  • Re: Sold Shaman set... :[
    ... > vanished from your inventory, ... I'm not blaming them because of my mistake. ... I can understand if I sold an apple but it was an armour set I paid 60g. ... realized I lost it I was in an istance. ...
    (alt.games.warcraft)
  • Re: How would you...
    ... inventory and sell certain products. ... I don't need to track to whom products were sold, ... "Jeff Boyce" wrote: ...
    (microsoft.public.access.tablesdbdesign)
  • Re: How to think about "cost" and SBR
    ... only 3 percent of your inventory needs to be sold ... We treat remaining inventory as scrap value until it is sold. ... Which is why your government pays publishers to shred books. ... Synergetics 3860 West First Street Box 809 Thatcher, ...
    (alt.marketing.online.ebay)
  • Re: dreck alert - Mozart pianoconcerti by Brautigam
    ... with the inventory for the better part of 15 years. ... got the inventory down to where they could consider a lower price ... 400 CD titles a year, of which roughly 200-250 were released in the ... Alfred Brendel release on Philips that sold a measly 850 units in the ...
    (rec.music.classical.recordings)