Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,933
    Quote Originally Posted by bubai View Post
    # delimiter was there.
    Code:
    " , #" & Format(dt, "yyyy-mm-dd") & "# , "
    But in case of using the constant do I just change it's declaration as below?
    Code:
    Const dt = Me.Paid_Dt
    any other change?
    No, the constant is to be used as the format string?



    You are not grasping how this is meant to work?

    All it is, is a format string in the format required, but rather than having to remember the syntax each time, you just need to remember a name, and if you cannot do that, then all you need to do is review a certain module, where it is stored?

    When you post code, post ALL the relevant code, not just a snippet which makes the code look incorrect.
    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

  2. #17
    bubai is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Nov 2014
    Location
    Dhaka
    Posts
    162
    Quote Originally Posted by Welshgasman View Post
    All it is, is a format string in the format required, but rather than having to remember the syntax each time, you just need to remember a name, and if you cannot do that, then all you need to do is review a certain module, where it is stored?
    Can you modify my code?

  3. #18
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,933
    No need. You just add my constant and refer to it as I have done.
    If you are happy with the way you have done it and it works, stick with that. yyyy-mm-dd is unambiguous.
    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

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

Similar Threads

  1. Replies: 7
    Last Post: 08-21-2020, 03:49 PM
  2. how to format a string on insert command
    By geotrouvetout67 in forum Programming
    Replies: 7
    Last Post: 08-30-2019, 04:24 PM
  3. Replies: 3
    Last Post: 03-16-2016, 11:07 AM
  4. Arguement not optional - INSERT INTO sql command
    By shabbaranks in forum Programming
    Replies: 5
    Last Post: 04-24-2013, 09:42 AM
  5. Replies: 5
    Last Post: 03-04-2012, 01:21 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