Results 1 to 2 of 2
  1. #1
    jlech1805 is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    1

    Building

    Hi,



    I am new to access and have been asked to build a database.


    We have a list on contractors with all their relevant information that will be easy to keep in a single table and filled in and updated with forms.

    The problem i am running into is we want to create queries that will be calculated fields using varies if then statements for each period going forward.

    My original idea was to create new "schedules" each time there is an update.

    Example

    Contractor Info Table
    Employee #1
    name
    vendor
    wage
    wage type
    expenses

    Schedule table
    Employee #1
    name
    Jan 2010
    Feb 2010
    Mar 2010(see below)

    name jan feb mar apr may jun jul aug sep oct nov dec
    xyz 1 1 1 1 1 1 0 0 0 0 0 0


    *1's indicate they are active for that period

    The problem is that we want to be able to keep the historical budgeted amounts and each time i get a new forecast (so different months) I'd have to re-write the query. As far as I can tell there is no way to write a macro to create a query each time for the new schedule.

    Any suggestions?

    My thoughts were to reference the column number so if i am running a report in january or september it would always reference what is needed....



    Anyway sorry for the likely confusing set up of the question.

    I am sure there is a simple answer that i am missing, but i am new to access.


    thanks in advance,


    justin

  2. #2
    Join Date
    May 2010
    Posts
    339
    Quote Originally Posted by jlech1805 View Post
    Hi,

    I am new to access and have been asked to build a database.


    We have a list on contractors with all their relevant information that will be easy to keep in a single table and filled in and updated with forms.

    The problem i am running into is we want to create queries that will be calculated fields using varies if then statements for each period going forward.

    My original idea was to create new "schedules" each time there is an update.

    Example

    Contractor Info Table
    Employee #1
    name
    vendor
    wage
    wage type
    expenses

    Schedule table
    Employee #1
    name
    Jan 2010
    Feb 2010
    Mar 2010(see below)

    name jan feb mar apr may jun jul aug sep oct nov dec
    xyz 1 1 1 1 1 1 0 0 0 0 0 0


    *1's indicate they are active for that period

    The problem is that we want to be able to keep the historical budgeted amounts and each time i get a new forecast (so different months) I'd have to re-write the query. As far as I can tell there is no way to write a macro to create a query each time for the new schedule.

    Any suggestions?

    My thoughts were to reference the column number so if i am running a report in january or september it would always reference what is needed....



    Anyway sorry for the likely confusing set up of the question.

    I am sure there is a simple answer that i am missing, but i am new to access.


    thanks in advance,


    justin
    Hi Justin,
    I would experiment with different table designs. A three table setup might work using a 1:M model.

    Code:
    tblContractor
    ContractorID [pk]
    Name
    Vendor
    Wage
    WageType
    Expenses
    MoreFields

    Code:
    tblSchedule
    ScheduleID [pk]
    Active [y/n]
    SchDate [date]
    MoreFields
    Code:
    tblEmployees
    EmployeeID [pk]
    Employee
    MoreFields
    You then would have to decide how to relate the tables using foreign keys.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Building Array
    By jgelpi16 in forum Forms
    Replies: 12
    Last Post: 03-22-2010, 12:33 PM
  2. need some advice building DB (noobie)
    By sureshot in forum Access
    Replies: 2
    Last Post: 10-12-2009, 09:49 AM
  3. Problem with building SQL string (VBA)
    By cdpeck in forum Programming
    Replies: 1
    Last Post: 09-15-2009, 04:25 AM
  4. Building a Difficult DateDiff Expression
    By jma108 in forum Queries
    Replies: 0
    Last Post: 06-15-2009, 12:39 PM
  5. building a distribution package
    By BevA in forum Access
    Replies: 0
    Last Post: 05-26-2006, 07:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums