Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Leen is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2014
    Posts
    70
    Quote Originally Posted by Ajax View Post
    that is not the same as compiling - in the vba window, go to Debug>Compile. Do this before continuing



    [COLOR=#3E3E3E] see above

    a) check spelling, b) ensure module has different name from function c) ensure function either has nothing or Public at the start (nothing is ok because Public is the default state) d) if being used in a form or report, post a screenshot of the controlsource for the control in question

    you really do need to spend a bit of time to learn about access. SQL is used in queries, queries are used (among other things) as recordsources for forms and reports and rowsources for combo's and listboxes. So your form has a recordsource - this will be a table (bad idea) a query or the sql. But from the sound of it you are not applying the function in a query anyway - however that is where I would expect you to use it - in the query which is the recordsource to the report you run to print the cheques
    1) I did the Debug/Compile; nothing happened
    2) Then I removed the ConvertDate call in Criteria/chqTbl-Qry, and now my form will start up again w/o the error
    3) Related to this, could you give me the literal code of the ConvertDate Function to be put in the Query/Criteria (I know one tiny mistake, messes it up completely).
    4) I know what SQL is, but couldn't find it anywhere in my program, neither in the Qry or Form (and still can't find it, so it must not be there).
    5) The form has as record source the chqTbl-Qry.
    6) Last, but not least, a date shows on my report (1st time!), but it is not the converted date, that's why I ask you to write the code for the Criteria row.

    Programming can be very hard, and so is communication...

    Thanks for your efforts!

  2. #17
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    1. if there are no errors nothing will appear to happen - but if you try to compile again the option will be greyed out until you make further changes to the code
    2. still confused about what you are doing, no idea what you are talking about. If you cannot provide a simple screenshot to show wht you are doing, I cannot help any further
    3. i've given you the code required so again, what you are saying makes no sense
    4. do you have any queries? if so open in design view you will see a SQL button bottom right of the screen and also in the 'view' dropdown option at the left of the ribbon
    5. means nothing without seeing the query

    you are very reticent about saying what you are doing - you have not said what you have done regarding b,c and d in my previous post nor about option explicit in the post before that

    I'll add to that the requirement to copy and paste what you have in your module, including the module header and remind you to post the sql

    That is 6 things you need to do before I can respond any further

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

Similar Threads

  1. Date manipulation
    By Daisy509th in forum Programming
    Replies: 8
    Last Post: 04-12-2018, 09:57 AM
  2. Replies: 1
    Last Post: 11-25-2012, 12:44 PM
  3. Date data manipulation
    By Duncan in forum Access
    Replies: 3
    Last Post: 03-09-2012, 11:13 PM
  4. A very complex idea ... is it feasible ?
    By stocki_stev in forum Access
    Replies: 3
    Last Post: 08-02-2011, 09:11 AM
  5. date manipulation
    By lpsd in forum Access
    Replies: 3
    Last Post: 12-23-2010, 12:06 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