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

    Me.openargs showing null value

    I am attaching a program, in this two forms, one is offer_entry form and the other form is form_offer_register.
    When an offer number is double clicked in the form_offer_register, that record opens in the offer_entry form for editing, for this I have coded open arg in the on load event of the offer entry form.


    The problem is that open arg coding is showing null value and is not working properly.
    Can anyone tell the reason for this?
    Thank you.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You have to pass the openargs in on the form open command?
    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
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Try:
    DoCmd.OpenForm "Offer_Entery", , , "[OfferNumber] = " & Me.txtOFFERNO, , , "EDIT"
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Bob Fitz View Post
    Try:
    DoCmd.OpenForm "Offer_Entery", , , "[OfferNumber] = " & Me.txtOFFERNO, , , "EDIT"
    Thanks Bob this code is working however the code I put in sometimes worked and sometimes didn't.
    Can you tell what is the special difference between these two?
    Thanks again.

  5. #5
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Welshgasman View Post
    You have to pass the openargs in on the form open command?
    I don't understand what you mean.
    thanks for replay.

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by deepaksharma View Post
    Thanks Bob this code is working however the code I put in sometimes worked and sometimes didn't.
    Can you tell what is the special difference between these two?
    Thanks again.
    Your original code opens the form and does filter the records correctly.
    However, in the OnOpen event of form Offer_Entery you have code that interrogates the form's OpenArg property and if that property is not = "EDIT", then the code moves to a new record.
    The code I offered sets the OpenArg property when the form is opened.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    thank you very much bob......

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

Similar Threads

  1. Null Values Still Showing Up
    By SpongebobKP in forum Queries
    Replies: 3
    Last Post: 10-08-2015, 06:55 AM
  2. Replies: 5
    Last Post: 01-27-2013, 06:04 PM
  3. Not showing records with null sum
    By eww in forum Queries
    Replies: 3
    Last Post: 04-04-2011, 03:10 PM
  4. Showing OpenArgs in a Report.
    By SIGMA248 in forum Programming
    Replies: 2
    Last Post: 04-01-2011, 11:57 AM
  5. Null Values not showing up in a Query
    By Valli in forum Queries
    Replies: 0
    Last Post: 01-04-2006, 03:53 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