Results 1 to 5 of 5
  1. #1
    zac123 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    17

    Question create fields on the fly or in advance?

    hi all,



    whats the best way to handle this.

    i want users to be able to add new items onto a form. these items are services that a customer may choose.

    in theory there could be 100 different services for each customer. but in practice the maximum will probably be 10.

    as a new service is created by the user new items will appear on the form. for example, a memo box for description some yes/no chk boxes and a text box.

    is there a way to create all these fields dynamically as and when a new service is selected or is it majorly complicated?

    would it be eaiser to just create up to 10 sets of fields and just show/hide them as and when the user creates the service?

    thanks
    zac

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,171
    Hi,

    it sounds to me you need a services table, and each new service is a new record in that table, no new field. You can link the services to the customer using a link table Customers_Services. A classical referential design.

    grNG

  3. #3
    zac123 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    17
    a ha, ok, so perhaps a one to many (form/sub form) type senario?

    so we'd have a customer table and a services table.

    on the customer form we could have a subform that when saved, inserted into the services table...

    hmmm, thinking out loid there

    does that sound about right?

  4. #4
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,171
    Hi,

    first you have to look at the relationships: I suppose 1 customer could have many services ad 1 service can be attributed to many customers. If so, you have a may to many relationship and you need an intermediate linking table.
    So you end up with 3 tables:
    1 customers table
    1 services table
    1 linking table customers_services

    for instance:

    tblCustomers
    --------------
    custID --> Primary key field (autonumber)
    custName (text)
    custAddress (text)
    custPostalCode(text)
    custCity (text)
    .........

    tblservices
    --------------
    srvID (autonumber) --> primary key
    srvDescription (text)
    ..............

    tblCustomer_Services
    ----------------------
    csID (autonumber) --> primary Key
    csCustomer (Long Integer) --> foreign key to tblCustomers.custID
    csService (Long Integer) --> Foreign Key to tblServices.crvID
    csServiceFromDate (Date/Time)
    ..............

    grNG

  5. #5
    zac123 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    17
    yes correct. multiple servers to multiple customers.

    but...

    our services are not like products. they are all different.

    for example we might offer a window cleaning service to one customer on every wednesday of each week but becuase the customer wants the windows cleaned at 04:00hrs we change extra

    also because this customer wants us to use clean water we add an extra charge

    also this customer wants us to email a picture of the clean window each time we clean it, so we ad that also.

    these are silly examples but you can see how we cant have set products. each customer may have many chargable services but each one is tailored.

    also just having a description box wont do as we have to be able to query and itemise for reports etc.

    does this change the info you've given me above?

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

Similar Threads

  1. Advance to next row in report
    By jgelpi16 in forum Reports
    Replies: 2
    Last Post: 01-29-2011, 10:40 PM
  2. advance date reminder
    By Denis in forum Database Design
    Replies: 1
    Last Post: 11-14-2010, 07:40 AM
  3. Advance Report Help
    By OldCityCat in forum Reports
    Replies: 1
    Last Post: 09-18-2010, 07:58 AM
  4. Create new fields
    By thart21 in forum Queries
    Replies: 7
    Last Post: 04-15-2010, 07:03 AM
  5. Replies: 3
    Last Post: 02-19-2010, 04:19 PM

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