"ACCESS" update a field in a table by entring in a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • farzadini
    New Member
    • Feb 2015
    • 1

    "ACCESS" update a field in a table by entring in a form

    hi there;
    i'm having a table of cities{CityTabl e}. where the other column is about an integer.
    i'm thinking of a form which load the cities and a chk box and a txt box for each one of them.
    i want to enter a number for each city in form(txt box) and check some of chk box. now the only cities checked would ADD the number in txt box to the proper field in CityTable.
  • jforbes
    Recognized Expert Top Contributor
    • Aug 2014
    • 1107

    #2
    If I understand you correctly, you want to fill a Datasheet with Something a bunch of Options, then use a CheckBox to select the Options, an a TextBox to enter an Amount for the Options. Then you want to click a button to Total up all the Amounts of Selected Items and update a City Record with the Total?

    If this is the case, the easiest way to do this is to create a Temp Table that has the fields that you want to display in the Datasheet (Subform). You may need to create a routine to populate the Temp Table with the Values and Amounts you want to select from out of the Database. Additionally, if multiple users will be doing this at the same time, you will want to add a User column to the Temp table to keep their work separate. Build your Main Form and Datasheet/Subform and clear out and populate the Temp Table whenever the Main Form Loads. Then all you need to do is create the Routine to DSum() the values that are Selected and show them to the user or update your City Table.

    If you detail what you are doing more, we can help you more.

    Comment

    Working...