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

    I want to say that I want to make the Access program so strong that when any unknown user uses this program, he should not face any kind of access generated error, even if he sees an error, the same see the error that is entered in the coding.

  2. #17
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,580
    In your current process no errors are generated.
    If you do get an error message it is usually to do with poor VBA Code.
    If an error occurs then you resolve it before moving on.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #18
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,027
    Quote Originally Posted by deepaksharma View Post
    I want to say that I want to make the Access program so strong that when any unknown user uses this program, he should not face any kind of access generated error, even if he sees an error, the same see the error that is entered in the coding.
    You have your work cut out for you then.
    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

  4. #19
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    But this is a error message "you tried to assign the null value to a variable that is not a variant data type"

  5. #20
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    When you type a space " " into a bound text control, Access will normally strip it out similarly to when you add a space to the end of any text in a bound textbox control.
    It's the default behavior on an Access form.

    So you need to either make that control or variable accept a null value, or make the table accept a null value.
    Alternative is to replace the null value with a non null value, e.g.

    If IsNull(Me.mytextbox) then MyVariable = " "

    You have been told this in at least 3 different ways.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  6. #21
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    now i get your point....

  7. #22
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    what is the main change you have done to solve this error?

  8. #23
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Mike Sir,
    Your method is working :-)
    but i don't understand where i made mistake ?

  9. #24
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Hello mike,
    I designed this program back as you suggested, I removed the devalut value from zero in the property of cast code in the main data file and made it no in the index.
    Now when I create this program with query then the same problem comes and if I design the form by making table relationship like you then the problem is solved.
    Please tell what is the difference between designing a form by creating a query and a table relationship?

Page 2 of 2 FirstFirst 12
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