Results 1 to 6 of 6
  1. #1
    Abdulaym is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    49

    Textbox and check box(Yes/No)

    Good day,


    Please I have a textbox that contain numbers e.g. 3000 and when I select the option Yes I want the 3000 to go to a field in the table i.e. "CASH' and when I select the option No it should go to a field in the table i.e. "POS". Please how do I go about this?Thanks

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Doable with code, but why complicate things? If this is, for example, a table of transactions, your textbox should be bound to the amount field (as I imagine you have done). Then a combobox bound to the transType field (my name for it) with 2 options - POS and CASH should put one of those values in the transType field.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Agree with Micron. A record can be only POS or CASH so two fields for amount is not correct design.

    Have one field for Amount and one field for TransType.
    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.

  4. #4
    Abdulaym is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    49
    Okay thanks for your response sir, I will try it sir

  5. #5
    Abdulaym is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    49
    Quote Originally Posted by June7 View Post
    Agree with Micron. A record can be only POS or CASH so two fields for amount is not correct design.

    Have one field for Amount and one field for TransType.
    Okay thanks for your response sir, I will try it sir

  6. #6
    Abdulaym is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2023
    Posts
    49
    Quote Originally Posted by Micron View Post
    Doable with code, but why complicate things? If this is, for example, a table of transactions, your textbox should be bound to the amount field (as I imagine you have done). Then a combobox bound to the transType field (my name for it) with 2 options - POS and CASH should put one of those values in the transType field.
    Okay thanks for your response sir, I will try it sir

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

Similar Threads

  1. Replies: 5
    Last Post: 09-14-2018, 06:08 AM
  2. Check if unbound textbox is null
    By matt_wpg in forum Programming
    Replies: 8
    Last Post: 06-21-2017, 08:23 PM
  3. Check Textbox for no value
    By dweekley in forum Programming
    Replies: 3
    Last Post: 04-28-2017, 11:39 AM
  4. Check textbox's old value.
    By Homegrownandy in forum Programming
    Replies: 2
    Last Post: 10-28-2015, 04:53 AM
  5. Replies: 3
    Last Post: 05-22-2014, 10:19 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