Search results

  1. M

    Export only certain fields from access to excel

    see here: https://msdn.microsoft.com/en-us/library/office/ff194892.aspx "Create new QueryDef object. Because it has a name, it is automatically appended to the QueryDefs collection."
  2. M

    docmd.runSQL code help - INSERT INTO with multiple WHERE clauses

    Hi, I your SELECT and FROM section you use JET SQL parameters and field names, in the case the JET interpeter knows what data type is each parameter. In the WHERE section, parameters are VBA, for the JET interpeter, it makes no diference if the text is hard coded or a variable - it is sent for...
  3. M

    Access Date Query Help

    BTW, are you using a pass-through Query to Oracle? DateAdd is a Microsoft function. This may not work...
  4. M

    Access Date Query Help

    Hi, The Date() function returns the current date at 00:00:00. 12:00 PM is 12 hours away, This is exactly where DateAdd Comes handy: Between DateAdd ( "h", -12, date() ) and DateAdd ( "h", 12, date() ) ATB
  5. M

    Access Date Query Help

    Hay, the guy is asking for some help with his homework, why make fun of him? just because you'v learned a few years before him?! :confused:
  6. M

    Access Date Query Help

    Hi, First - Now function returns the current date and time. Use Date function to receive the current date without time. Next - look into DateAdd function (Google: DateAdd VBA) to Add or subtract time from a date and-or time, here is a good place to start...
  7. M

    Control Tip to show record from another table...

    Hi, The ID number you can use in a continuos form, is the one of the record in focus. Control tip, or mouseover, are not nssaserily on a control in the record in focus. In other words: all records will show data related to only one record - the record in focus. ATB
  8. M

    VBA Automation: Add page number to header

    Hi, Here: https://msdn.microsoft.com/en-us/library/office/aa223048(v=office.11).aspx I found the PageNumbers.Add has added a PageNumber Object, see how you refer to it: https://msdn.microsoft.com/en-us/library/office/aa223047(v=office.11).aspx. On this Object use RestartNumberingAtSection to...
  9. M

    VBA Automation: Add page number to header

    Hi, Iv'e never done this in Word, but Iv'e done it it access reports: it seems like this code runs in a loop. You should have the PageNumbers Property initialized for each iteration of x. or, see if this helps you: http://word.mvps.org/FAQs/Numbering/PageNumbering.htm or this...
  10. M

    Date Format

    Hi, When filtering by date, the date format is not relevant, Date data type is a floating point numeric value. You can read some about date formatting: http://www.techonthenet.com/access/functions/date/format.php tips for working with dates...
  11. M

    Run time error '3011' exporting to excel

    Hi, Are you sure there is no typo in the query name: "CUSTOMER FOCUS"?
  12. M

    vba code disappears

    Corruption?... :eek: This is what has append to me a short while ago, http://www.access-programmers.co.uk/forums/showthread.php?t=276786 I recreated the file, and rewritten all code! Here is an other great link for dealing with Corruption: http://allenbrowne.com/ser-47.html But it really seems...
  13. M

    vba code disappears

    Hi, You have apparently never lost the code, it has just not bin executed... I could think of a reason for that: Is it possible the on Close event in the properties had no reference in the Form_Close event procedure? in that case, clicking on "Code builder" option checks for this procedure...
  14. M

    procedure call with Array arguments

    Hi, First, you should read the thread CJ_London pointed. Here you declare a Variant type variable: Dim ReturnCoords As Variant The function expects an array of Variants: Public Sub RearrangeCoordinates(ByRef RearCoord() As Variant, ByRef ReturnCoords() As Variant) and you pass to the function...
  15. M

    Lock Form until Certain Feild is Entered

    http://www.techonthenet.com/access/functions/advanced/if_then.php
  16. M

    3 tables display data from 1 depending on value in another

    Great! Now save this query, and join it to read tbl, on DateOut and PupilID, and Join Book tbl to Read tbl on BookID. you now can display the book title each Pupil has read last. read about inner join: http://www.w3schools.com/sql/sql_join.asp You can also use the Access query builder...
  17. M

    Private Sub Problem.

    No, make public only what only what you want to be called publicly. Probably... but even if so, I must note this is very pore practice, you should follow JHB's suggestion to have forms communicate via a global module, and have meaning full names for your controls. You can read this for better...
  18. M

    3 tables display data from 1 depending on value in another

    you only have to join 2: Books and Read. You were not asked about the Pupil ;)
  19. M

    3 tables display data from 1 depending on value in another

    Hi, Look into the MAX function in a grouping query, and into table joining in Queries. http://www.sqlcourse2.com/joins.html http://www.sqlcourse2.com/groupby.html ATB!
  20. M

    Private Sub Problem.

    Yup! If you want to run the Sub from another form (actually: module), you must make it public. NOTE: If the form is not loaded (=opened), checking the value of a control will result an error! You can: either - handle this error (google "MS ACCESS VBA Error handling") or - check if the form is...
Back
Top Bottom