Results 1 to 5 of 5
  1. #1
    teekc is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Posts
    3

    Fill in data into table upon "on click"

    The background
    I have a Table and a Form. I used the Form to key in data into my Table.
    My Table has Name, Return Date, Borrow Date, Availability(1/0)
    My Form only shows Name and Borrow Date for user to enter.

    My concern
    At the end, there are two buttons, Button Ack and Button Print.
    Whenever I enter the name and borrow date, i am give a choice of either clicking Button Ack or Button Print.

    If I click on Button Ack, I want its correspond Return Date set to today, Availability set to 1.


    If I click on Button Print, I want its correspond Return Date set to zero, Availabilty set to 0.

    Help? Please?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    If I click on Button Print, I want its correspond Return Date set to zero, Availabilty set to 0.
    Do you really want set the date field to zero, or set it to Null.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    teekc is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Posts
    3
    Quote Originally Posted by Bob Fitz View Post
    Do you really want set the date field to zero, or set it to Null.
    set it to as i never entered anything, null that's it?

  4. #4
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    try this...

    Button_Ack_Click()
    me.[return date] = date()
    me.availability = 1
    End Sub

    Button_Print_Click()
    me.[return date] = Null
    me.availability = 0
    End Sub

  5. #5
    teekc is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Posts
    3
    yes, done, worked, thank you a lot, i am VB zero, so i have to spent sometime learning

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

Similar Threads

  1. Replies: 1
    Last Post: 02-17-2013, 04:46 PM
  2. Replies: 5
    Last Post: 02-05-2013, 10:57 PM
  3. saves data with out click "Save" button in forms
    By terrythomasvda in forum Forms
    Replies: 4
    Last Post: 01-14-2013, 01:31 PM
  4. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  5. Using "On Click" or "On Dbl Click" in a Switchboard
    By James Parker in forum Access
    Replies: 2
    Last Post: 01-12-2012, 11:00 AM

Tags for this Thread

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