Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389

    Variable error

    By downloading the file from this file link, when you open the admission form and click on the box of the cast and tab by giving 1 space, then 1 error is shown.
    "you tried to assign the null value to a variable that is not a variant data type."


    What is it and how can it be remove https://drive.google.com/file/d/1VEA...w?usp=drivesdk

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,283
    Most people will not download files from external links.
    Your variable is not declared as a variant. That is the only data type that can hold a Null.
    So make sure it is not null by using the NZ() function to replace it with soimething that is not null, or find out why you have the null in the first place.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,861
    using the NX() function
    Typo Gman?

    NZ()
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,283
    Quote Originally Posted by moke123 View Post
    Typo Gman?

    NZ()
    Yep.
    Now corrected. Thanks.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    i don't understand what event to write...?

  6. #6
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,758
    Hi
    See the attached.
    I renamed some of the fields in both tables
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  7. #7
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Very Good
    Sir I use code instead of micro can i write any cod instead?

  8. #8
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,758
    No code used at all in my process
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  9. #9
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    yes, you are right but i want to use code. is it possible?

  10. #10
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,758
    Code to do what?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  11. #11
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    if click on the box of the cast and tab by giving 1 space, then message will show "Please select cast" and cursor focus on cast box.

  12. #12
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    and i don't have much knowledge about macro

  13. #13
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,758
    Why would you put a space in the Cast Combobox.
    The Combobox is designed so that you select one of the Cast's Listed.
    If the Cast is not in the list then you can use Code to add to the List
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  14. #14
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Sir, I completely agree with your point but giving space somewhere and showing this error is also an error somewhere and I want to give it a professional look in which I am taking into account even the smallest error.

  15. #15
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,758
    Sorry I am not understanding what it is you are referring to.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-02-2021, 09:15 AM
  2. Replies: 2
    Last Post: 07-23-2021, 10:32 AM
  3. Replies: 2
    Last Post: 05-14-2021, 08:39 AM
  4. Replies: 2
    Last Post: 07-23-2019, 01:37 PM
  5. Error 91 Object Variable or Block Variable Not Set
    By mindbender in forum Programming
    Replies: 5
    Last Post: 05-01-2017, 12:01 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