Results 1 to 8 of 8
  1. #1
    cottonland is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    9

    Self Taught and don't know very much

    My form is linked to the correct table. One of the fields on the form is "QuoteID".. I want this particular field to automatically populate when the form opens. Is there anyway to automatically assign a value to this particular text box, while also assigning a control source to it? There is no problem as long as the field is Unbound.

    Thanks in advance

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    This is what autonumber field is for. You don't have to do any work, the pc assigns the #.
    and you can go to it if you know it...

    docmd.openform "myForm",,,"[clientid] = " & txtBoxID

  3. #3
    cottonland is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    9
    Let me clarify... The "QuoteID" is entered on the first form of the series. It is used as the identifier for all entries in all tables relative to this particular customer. I need the "QuoteID" on all subsequent forms to be the same as the one initially entered. The code I have used for this is " Me![QuoteID] = Forms![HIDDEN FORM]![QuoteID]". Hidden form is a form that stays open in the background which houses the QuoteID so when a new form opens, the field is automatically populated. The problem comes when I try to assign the control source of the field on the form to the respective table, I get an error message that you can't assign a value to this object.

    "QuoteID" is the unique identifier I use to query all data for a particular customer. Is there a better way to do this??

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Review Primary key and foreign key.
    If you have designed your tables and relationships based on your business rules, then this should be handled by your database structure.

    To find all info about a Customer, I would think CustomerID would be the means.

    In your set up it seems

    Code:
    A Customer may have 1 or Many Quotes.
    And this would represent a 1 to Many relationship between Customer and Quote.
    Perhaps there is more to the issue than has been described.
    Can you show us screen capture of your tables and relationships (jpg)?

  5. #5
    cottonland is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    9
    I am sure I am not doing a very good job explaining myself due to my limited experience.

    I have a form "Quotes" whose record source is the "Quotes" Table. The "QuoteID" is entered by the user on this form which is stored in the Quotes Table. The relationship between the Quotes Table to all other tables for the "QuoteID" would be one to many.

    I also have an Equipment table where multiple items of equipment are stored based on the "QuoteID". One of the fields on the Equipment form(whose record source is the Equipment table) is QuoteID. When the Equipment form opens, I am trying to get the QuoteID field to automatically populate with the same data entered as the QuoteID on the initial "Quotes" form. As long as the "QuoteID" field remains unbound, I am able to assign the value automatically, but once I set the control source to the corresponding "QuoteID" field in the Equipment TABLE, I get the error message that I can't assign a value to this object.

    Hopefully this is a more understandable explanation. If not, I apologize.....

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    cottonland,

    A suggestion. You know your environment and what you are trying to accomplish. But readers only know what we can glean from your post. Step back from Access and database for a moment and, using simple plain English, give us the 30,000 foot overview of WHAT your business is about.
    With respect, your post is telling (me at least) HOW you are trying to solve something. We need to know more about that something in order to understand your post. That is, we need some context to help us understand WHAT you do, so that we may offer suggestions, advice, options on HOW that might be accomplished. But first is WHAT, then HOW.

    I'm not sure what QuoteID has to do with Equipment. Does your company build/manufacture/sell/loan equipment?

    So forget forms for the moment and hit us with the overview you would tell someone who knows nothing about you, your environment, or database.

  7. #7
    cottonland is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    9
    I am creating a program for my producers (insurance agents) to gather data to quote insurance coverages for farms, which would include buildings, equipment, vehicles and other types of property. I am not wanting the program to actually calculate premiums, simply store the information required to generate a quote. Each Account is assigned an overall ID(QuoteID). Some of the information stored for an account is vehicles, locations owned or rented, equipment, drivers and so on. There could be multiple items of equipment, vehicles etc for an account.

    I am wanting to control the order and what data they are asked for through the use of the program so that multiple producers are all doing things the same way. I then generate a report, layed out in a specific format, based on the data they have been asked for. This report is then used to generate the actual quote either in house or it could be emailed to a service center to actually enter the data. Another report will be used as a proposal to be presented to each customer. Hope this helps.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Here is a link to some free data models related to Insurance. These are generic and are intended to be a starting point. Your requirements, terminology etc may be very different.

    At some point your Quote becomes a Policy number, no?

    I recommend you watch these free videos to help with design.

    Intro to Database Daniel Soper

    The Relational Model

    Data Model and ERD

    Good luck with your project.

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

Similar Threads

  1. Replies: 4
    Last Post: 04-06-2016, 10:31 AM
  2. Creating Billing System, self taught, and confused!
    By LethalMeatball in forum Access
    Replies: 7
    Last Post: 11-13-2013, 03:16 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