Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    a ZLS string is still returned
    That is a very good point. I forgot that the return value was a zls.


    There should be a test for that and if true (return is "") then do one thing, otherwise do other thing.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  2. #17
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296
    Quote Originally Posted by Welshgasman View Post
    Yes, and as the Docs mentioned, that places a default value in the input box. The InputPrompt is a ZLS not Null though, so NZ will not work, and so no default is displayed.
    I tested the code myself, and that is what happend, hence post #8.

    Now if the O/P was to change InputPrompt to variant, it works, a default is displayed, but then if the user presses Cancel, a ZLS string is still returned
    I must have misunderstood. I could have sworn I read somewhere that hitting the cancel button on an input box returns null but I can just use an if statement then.
    I will attempt to create a relationship with the HeatHistory table and see if I can get Me.Initials to show. If you have advice on how to do this I would appreciate it!

    Quote Originally Posted by Micron View Post
    Not sure why I'm still following this given what seems to be mucho discussion about the default value of an input box and such and having no comment on my prior post.
    I agree, with OP - a value should be returned by the input box if the user does not enter anything into it. At least that's what the M$ documentation says should happen. However,at this point I'll say that approach makes no sense to me since it appears from earlier posts that if there is no user input, the default value is the same thing every time - 12 characters of the app path. How does that identify any one individual??
    Unless I'm missing something I see no sense in the approach. Time to get the credentials of the user making the change/addition - either TempVars or fosUserName function?
    I appreciate the effort to still help.
    Heatmaster9000_RD4_KL.mdb
    11987654321
    10
    Every frontend has the initials (and if using one the remote connection) of the user. So it can be identified by that as a last resort.
    I am not familiar with those functions so I will look into them. Thank you for the recommendation.

  3. #18
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,566
    Test it all out yourself by walking through the code line by line.
    That is what I did. I rarely used inputboxes unless for my use only.
    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
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296
    Quote Originally Posted by Welshgasman View Post
    Test it all out yourself by walking through the code line by line.
    That is what I did. I rarely used inputboxes unless for my use only.
    I got it to work! It works with my InpRs function. I just have to figure out how to filter it to apply to only the record being saved. It does log the time of the edit I suppose I could do it by that.
    I couldn't get the tables to link so I could use Me.Initials. I think I can close this post now though.

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

Similar Threads

  1. CurrentDb.Execute Question
    By d9pierce1 in forum Programming
    Replies: 10
    Last Post: 09-02-2020, 10:53 AM
  2. RunSQL vs. QueryDef.Execute vs. CurrentDB.Execute
    By caubetiep1337 in forum Queries
    Replies: 8
    Last Post: 12-16-2015, 05:35 PM
  3. Error in CurrentDb.Execute
    By Stefan Moser in forum Access
    Replies: 5
    Last Post: 04-17-2015, 01:38 PM
  4. vba code help - Currentdb.execute
    By joycesolomon in forum Programming
    Replies: 5
    Last Post: 08-11-2014, 11:25 AM
  5. Update sql using currentdb.execute
    By laavista in forum Access
    Replies: 13
    Last Post: 08-15-2011, 03:51 PM

Tags for this Thread

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