Search results

  1. S

    try two (or more) paths in one code

    Can you say what you are trying to do, instead of telling us what doesn't work? Thanks.
  2. S

    try two (or more) paths in one code

    Why do you need to use Windows Explorer? You don't need Explorer to work with files in VBA.
  3. S

    Open Form with an if

    He's checking if the record exists before opening the form.
  4. S

    Open Form with an if

    The string in your IF is the WHERE clause for a recordset or dlookup. addnew = currentdb.openrecordset("select 1 from tbl_over where [Subba3]='" & Subba & "'").eof if addnew then 'record doesn't exist add it else 'record exists end if
  5. S

    Best use of Macros

    Triggers have their place. Good to have if not overused. Difficult to debug. The idea of having a layer of intelligence (?) between the database and application is great. Even though I don't use Access anymore, I saw Access had data macros and got a little bit excited. After an hour or two of...
  6. S

    Best use of Macros

    Stability maybe? Do macros need to be compiled? Do macros ever become corrupt? It's not much of a selling point anyway. All other Office applications, although they are called macros are nothing like Access macros, they are VBA. You can record a macro in Excel, Word, Powerpoint, etc, but if...
  7. S

    Export Records from a Form

    I'd use Excel's copyfromrecordset which would probably go something like with createobject("excel.application") with .open(filepath) .range("a1").copyfromrecordset me.recordset .close save:=yes end with .quit end with That's out of my head so probably not 100%.
  8. S

    One field determining the value of another field

    Data belongs in tables. F/Full/25 and A/Associate/15 is data. By hard coding the values into the form you'd need to edit the form if the data ever needs to be changed. Memtype and Dues should be fields in a separate table that links to table1 and the options displayed in a list on the form.
  9. S

    Cover Form Controls - Hide Form Operations?

    If you clear a list because the page changes you have to fill again if the page becomes active again. ? As far as database performance is concerned, local memory isn't really the issue. Data traversing the network is, so leave the lists filled.
  10. S

    Help with date format

    UK. No error.
  11. S

    Cover Form Controls - Hide Form Operations?

    There are some things that you really shouldn't need to use. echo false is one of them. I think you need to stop asking questions. Post a stripped down database (with sample data in Access) and say what you are trying to do. edited due to reading fail ¬_¬
  12. S

    Help with date format

    The easy solution to using dates in SQL is to use the month name. Then order doesn't matter. #5/12/2017# makes you think. #5/dec/2017# #december 5 2017# #dec-5-2017# #2017 5 dec# should all work and leave nothing to the imagination. It'll work in the filter in question here too, so if you...
  13. S

    Back and Forth Navigation between Access Forms?

    Well, it looks like I confused things here, sorry. When I said the search screen should be the first/main screen, I was just looking at the diagram. Normally in a database application, you drill down into data. You should try to follow a linear path, but the last three boxes in the diagram are...
  14. S

    Back and Forth Navigation between Access Forms?

    In your diagram 'find projects' should come before 'projects'. Infact you should remove 'Projects' and 'Add Projects' from the list. You're either adding a new record or editing an existing one. Therefore, you need to determine what the user needs to do, so the find screen should be the main...
  15. S

    Update with SQL

    Your MTMPM table contains an autonumber ID field. ID is short for IDentification. That field can not contain a duplicate value. It's purpose is to IDentify the record you are working with. Your update SQL is updating all records for the specified date. So, if 22 records were created by...
  16. S

    Selecting data table columns based on column location instead of column names

    cross posted http://www.vbaexpress.com/forum/showthread.php?61450-Selecting-data-from-MS-Access-table-columns-based-on-column-location-instead-of-colum
  17. S

    convert a short text yyyymmdd in dd-mm-yyyy

    In a standard module Public Function xdate(dt As String) As String If Len(dt) = 8 Then s = Left(dt, 4) & " " & Mid(dt, 5, 2) & " " & MonthName(CLng(Right(dt, 2))) If IsDate(s) Then xdate = Format(CDate(s), "dd-mm-yyyy") End If End Function e.g. Debug.Print...
  18. S

    Are Global Variables Really that bad ?

    I've never used global variables in a database application. Why would you need a bunch of values sitting in memory when you can load them in, unless you're on a very poor network? I don't think there's any excuse for unhandled errors, especially if you know you're going to release an MDE/ACCDE...
  19. S

    3075 missing operator

    You have two too many brackets WHERE (((JassnrF1.DateIn) strSQL = "SELECT Count(*) AS [Fail Count], Left([Field4],25) AS [Fail Desc], field3 AS Status " & _ "FROM JassnrF1 " & _ "WHERE DateIn BETWEEN #" & Format(Msgstart, "dd-mmm-yyyy") & "# AND #" & Format(Msgend, "dd-mmm-yyyy") & "#...
  20. S

    Max Locks Per File

    Considering there are many ways of doing the same thing in Access, better questions would probably be 'why am I being told to change this setting?' and 'can I use different code that means I don't need to?'.
Back
Top Bottom