Results 1 to 3 of 3
  1. #1
    onka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2015
    Posts
    2

    Macro that changes value based on a date input in another filed

    Hello,



    Could you please help me with one macro? I have a simple form with fields from my user table. I have a field "user disabled" where you can specify date (or pick from a calendar), and there is another field called "status" where I have dropdown menu with currently two options: Enabled and Disabled. Is there a way to create macro that automatically changes "status" field value to disabled when "user disabled" field contains date? And if its empty, user will be automatically in Enabled status?

    Thank you !

    br
    Onka

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Not a macro, a query does it. Use the macro to run an update query. The query uses the fields on the form as critieria.

    update [status] from table Set [status] = forms!frmUser!cboStatus

  3. #3
    onka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2015
    Posts
    2
    Hi ranman,

    thank you for answer. I will try that!

    br
    Onka

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

Similar Threads

  1. Replies: 1
    Last Post: 10-30-2014, 10:11 AM
  2. Sum numerical filed based on other field
    By BorisGomel in forum Access
    Replies: 0
    Last Post: 07-11-2012, 09:54 AM
  3. Sum one filed based on its contsest
    By BorisGomel in forum Access
    Replies: 2
    Last Post: 03-29-2012, 03:01 PM
  4. Replies: 7
    Last Post: 02-10-2012, 08:08 PM
  5. Replies: 1
    Last Post: 11-05-2010, 05:49 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