Results 1 to 10 of 10
  1. #1
    kmims44 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    24

    default values in a form


    I am using a form for Data entry and I'm trying to figure out 1. Is there a way I can I can Display the last record entered next to a blank data entry form so the user can see what they already enetered? 2. is there a way to lookup a record and based on 3 field values to autopopulate another field. I have 3 fields "ContractName" "WBS" "Slin" as drop down menus, when the user selcts the Contract Name I want it to filter the SLIN so that only SLINs on that contract can be selected, when they select WBS I want it to lookup records that match SLIN, WBS, and ContractName and use the Date field which i then want the form field to autopopulate the "next Date" (>Date already entered+30days). Can these tasks be done?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Maybe.

    1. You don't want to use Continuous or Datasheet view of forms? If you want SingleRecord view side-by-side, not sure how well this will work. Form/Subform may be one option. Form and subform will have identical RecordSource and controls. Main form opens to last record and subform set to open only to new record. Another possibilty is unbound controls as the 'new' record data entry and use VBA code to save the entered values to a new record in table.

    2. Sounds like dependent (cascading) comboboxes, review http://datapigtechnologies.com/flash...combobox2.html. Autopopulating the date field will require VBA code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kmims44 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    24
    ok so I got the comobo box situation worked out for evrything except the date. The form has an unbound combo box labeled BudgetDate what I want to see there is a drop down menu of Month, Year of each month in the date range of PeriodofPerformanceStartDate and PeriodOfPerformanceEndDate. I assumed I would have to have thse dates on the form as well so I put them on but I have them hidden. i have revied the date range query posts and I cannot seem to get mine to work at all????

  4. #4
    kmims44 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    24
    nevermind I figured it out...finally!

  5. #5
    kmims44 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    24
    OK I lied I guess I didnt figure it out and I have found another issue now that I have set up the combo boxes...its not linking to any table????? Any idea what the VBA code would be for the date issue?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    What do you mean not linking to any table? Data from comboboxes is not saved to table?

    Not sure about the date issue. I don't know your data structure and form setup well enough. What date do you want to base the calculation on - the last record in table meeting the specified criteria?

    If you want to provide file for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    MBA80 is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2012
    Posts
    13
    June7,

    I used the link you gave for the video on the cascading combo boxes. I am not following the process of how to get the second boxes results to be tied to the first combo box selection. One other explanation I found shows the need to have all of the information to be used between the different combo boxes. Another site shows that a query is needed to generate the proper responses to the subsequent combo boxes. I am a bit confused as to how I need to work this issue.

    My situation is a simple DB (one that you helped me with before). The connected combo boxes I would like to create are this:

    1) User selects the area they work
    2) User selects the type of work they are doing.

    Pretty straight forward, except for the fact that all but one of the "areas they work" will need to show the same options in the second combo box. There is one area of the company that will need their own unique entries to appear for the second combo box. I can clean out my DB and send it if need be.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    The tutorial is quite explicit. I am rather lost in your description of issue and why you are having difficulty applying the described technique. Yes, if you want to provide file might be able to understand better.

    How many areas and how many types are there?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    MBA80 is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2012
    Posts
    13
    Sorry for the delay in response, work is crazy right now.

    I am confused on what is needed for the combo boxes to pull their information to begin with. Is the upper box in the video just populated from a field in a table? Wouldn't the second box (based on the information put in the first box) need to be a query of some sort so that the query is rerun depending on what information is selected in the first box?

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Both comboboxes would have a RowSource that queries a table to provide a list of values. The second combobox would have criteria referencing the first combobox. The second combobox would be requeried by VBA code in the AfterUpdate event of the first combobox (or the GotFocus event of the second).

    This is all demonstrated step-by-step in the video. However, if that one is not getting the point across, Google dependent comboboxes. There are other tutorials available.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Default Values In Form
    By ASW in forum Programming
    Replies: 2
    Last Post: 01-18-2012, 08:55 AM
  2. Default Min & Max Date Values in Form
    By alsoto in forum Forms
    Replies: 3
    Last Post: 10-03-2011, 10:54 AM
  3. Default Values in a form
    By handjor in forum Forms
    Replies: 3
    Last Post: 08-03-2011, 09:11 AM
  4. option group default values
    By wlumpkin in forum Access
    Replies: 3
    Last Post: 02-15-2011, 03:30 PM
  5. Default Values
    By twainscott in forum Programming
    Replies: 0
    Last Post: 09-14-2006, 11:18 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