Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2017
    Posts
    1

    Unanswered: MS ACCESS WEB APP - Update linked textbox based on combo selection.

    Hello All,
    Please forgive is this has been asked or simple as I am new to the MS Access programing. My question is as follows:

    Goal: Is to update a textbox or datepicker with 'Date()' if the combobox has "Completed" selected.

    Info:
    1. I am using a MS ACCESS web database. I have a form that I have built where I would like to have a textbox or datepicker that is linked to the 'CompleteDate' field on my table update with 'Date()' based on whether or not the Combo Box on the form has "Completed" selected.
    2. I know I can accomplish this by using the IF statement as the control source for the textbox/datepicker but If I do this it wont save the record on the table.

    I understand most of the VBA and Macro programming but I am not sure how to go about auto updating the textbox/datepicker and make sure it save to the field on the table.

    Any help would be greatly appreciated.

    Thanks
    Rob J

  2. #2
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    1,101
    Provided Answers: 17
    If the control is bound to the underlying data source, you don't need to worry about saving its value.

    You need to establish what should be the trigger for setting the date value of the control, and then using the relevant event. For example, you could use the combo box's Change event (to set the date when the combo box is set to "Completed"), or a command button's Click event if you want to code a series of checks.

    FWIW, if the goal is just to display the data value, use a text box. Only use a date picker if you want the users to be able to pick dates.
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •