prevent duplicate event on Date (access VBA ) English

Поделиться
HTML-код
  • Опубликовано: 8 янв 2025

Комментарии •

  • @moti_attia
    @moti_attia Год назад

    Hi Farouk
    Shouldn't the all "save the record" process be in the "ELSE" section within the "IF" statement?

  • @advertaCS
    @advertaCS 2 года назад

    Can you help me with this I have :
    'ID'-(autonumber, primarykey)
    'RFTag''-(text, primarykey)
    'tagnumber' - (number)
    'FName'(text)
    'Date' (date/time)...
    The user is scaning his RFTag on a device on date() and prints a ticket
    I want to prevent one user to print the ticket twice on a same date
    How do I do that...
    the format of RFTag is like this '31e4df54' 'C2D51069' 'f1988c70'
    when i combine RFTag and Date in a lookup wizzard for data type I get Text instade for Number
    so I cant use 'double' as a result type for 'theid' field

  • @denis0704
    @denis0704 2 года назад +1

    Hey Farouk... Great tutorial... What about if we need date range... for example between 27th and 29th Feb?

    • @askfarouk
      @askfarouk  2 года назад +1

      Hi
      You can add a step to check the date before running the code

    • @denis0704
      @denis0704 2 года назад

      @@askfarouk, can you point me in right direction, please? If I have car no.1 reserved to be rented from Feb 27th at 17 pm, to Feb 29th 11 am, how would you establish this form?

    • @askfarouk
      @askfarouk  2 года назад +1

      @@denis0704 i am not sure if i understand the whole concept but as general guide mark the car as rented based on the dates and as long as it is rented you can't rent it again
      I mean the constrain will use a yes or no rent field as the value of this field will be update based on rent card

    • @denis0704
      @denis0704 Год назад +1

      ​@@askfarouk I will try to make it simple. Can you try your example with 'Date In' and 'Date Out' fields? (adding hours 'Time In' and 'Time Out' would be even more helpful)
      So, basically, we assign task to Edward on 'Date In' (Time In) and his task last until 'Date Out' (Time Out)... Between this date range Edward can't be assigned to any other task. Please, help me... :) Thanks in advance !

    • @askfarouk
      @askfarouk  Год назад

      I understand your concept from the previous comment and it is a little hard to be implemented in MSaccess. Sure you can but it will be complicated.
      This is why I suggested to add another field yes or no type let's assume named as busy, this field value change based on the end date so if the end date in 22-jan it will be yes till the system date is greater than the end date.

  • @meesam55
    @meesam55 2 года назад

    I have a database for pensioners to give pension i want when i give payment to a person don't repeat payment in a month
    Please help me to this.

    • @askfarouk
      @askfarouk  2 года назад

      Creat a new column that concatenate the person id and month from payment and prevent duplicate in that column

    • @meesam55
      @meesam55 2 года назад +1

      @@askfarouk
      Thanks for your kind rply sir
      Can you explain please about new column
      In my transaction table i have the columns
      Tran id
      Date
      Account no-combo box
      Pen name
      Amount paid

    • @askfarouk
      @askfarouk  2 года назад

      @@meesam55 keep the trans id as it is , just a new column and on the run time combine the beneficiary id with month of transaction using format(date,"mm-yy")than mark this as index no duplicate using