• WSCronk

    WSCronk

    @wscronk

    Viewing 15 replies - 16 through 30 (of 39 total)
    Author
    Replies
    • in reply to: How to synchronise main and slave forms? #1342242

      I think the original post indicated there was only one table.

      What the user wants to do is disply one record but not including a memo field in one form on the left hand screen, and the memo field in a second form on the right hand screen.

      The simplest would be to put in the OnCurrent Event of the Main form
      Forms!SlaveForm.Filter=chr(34) & “OwnerID=” & me.OwnerID & chr(34)

    • in reply to: Concatenating multiple records into a single text box #1339640

      And don’t use padding. Use vbCrLf to start the next comment on a new line. Or two of them to have a separator line.

    • in reply to: Last Working Day #1339639

      What is supposed to happen on Tuesday if the day before was a public holiday? If you want to cater for non work weekdays, you will need a lookup table of public holidays and the exercise is not a trivial one, do-able but I’d be using VBA to get the date of the previous work day.

    • in reply to: Access 2003: Running a delete query #1339638

      Can you delete a record manually to check there is no locking in place?

    • in reply to: VBA and Backend DB Access #1333716

      Alternatively

      Dim db as database
      Set db = DBEngine(0).OpenDatabase(“C:PathYourBackend.mdb”)
      Debug.Print db.TableDefs(“tblYourTable”).DateCreated

    • in reply to: Birthday cover sheet #1331786

      Why not use a query with criteria
      Between Date()+1 AND DateSerial(Year(Date()), Month(Date())+2,0)

    • in reply to: Access VBA 2010: Undefined function #1331470

      The Split function will generate a string array, and in this case with email addresses, the first item will be the user name and the second the “domain” name.

      Looking at the comment next to the docmd.openquery “Leg E-news_append”, you only want the “domain”.

      If so, Split is not the best function.

      Use
      domain= mid(strEmailAddress, instr(strEmailAddress,”@”) +1)

      This will find the position of the @ in the email address, and give only characters after that position.

    • in reply to: Using a form to input query criteria #1329490

      I have worked on some Access databases where the original developer used some pretty complex queries generated by the query builder.

      So while VBA is not the only way, IMO VBA is the must way to go for simplification of debugging.

      Cronk

    • in reply to: Importing Excel files into Access database #1326767

      And you could loop through all the files in the folder using Dir to process them without prompting for file names

      Code:
         strFile = Dir(strFolderPath & “*.xls”)
         Do While strFile  “”
            strFileFullName = strFolderPath & “” & strFile
            DoCmd.TransferSpreadsheet …..,strFileFullName,…
            Kill strFileFullName
            strFile = Dir
         Loop
      
      
      
    • in reply to: Conditional Formatting – Access 2007 Form #1326766

      You could use
      Expression is [Text2]=”A” Or [Text2]=”B” Or [Text2]=”C”

    • in reply to: Double vs. Decimal Data Type – Access 2010 #1326754

      This way you can have the account code much longer if you want.

    • in reply to: Table Move Causes Code Failure? #1326005

      I’ve never used Seek. Seek would be presumably be faster than FindFirst if the former is based on an index. But then there is the time to open the direct link to the backend.

      I must remember this in future and check where search times are critical.

      I’m glad the initial query was raised.

    • in reply to: Proper use of Round function #1325114

      You could have avoided using the hidden text box by using
      =Nz(Round([fsubMaterials].[Form]![txtMaterials],2),0)+ (1 + [txtMarkupAmt])

      BTW, are you aware that if [fsubMaterials].[Form]![txtMaterials] has a null value, then Nz([fsubMaterials].[Form]![txtMaterials],2) will result in a value of 2?

      Cronk

    • in reply to: Can’t copy MDB file #1321354

      Maybe you are backing up an older version of the data.

      I’d suggest you try and locate the mdb data file that your VB6 application is connected to.

      You could do this by closing everything else, then opening your VB6 application and going to a record currently existing in your data. This should open the connection to your mdb and the ldb locking file should be created. (Whenever you open an mdb which is read/write an ldb file is created eg if your data file is XXX.mdb, a file XXX.ldb is created in the same folder).

      I would search for this ldb file and backup the corresponding mdb.

      Hope that is of assistance.

      Cronk

    • in reply to: Sorting numbers in Access queries #1315489

      The source data field must be a text field and if the field in MS Access containing the imported data, drops any leading zero, it is a numeric field.

      Change the Access field to text.

      It is a common misunderstanding that an all digit field should be considered numeric. US and Australian zip/post codes are all digits but you never do numeric operations on them, similarly telephone numbers. These are text data and in all my systems are treated as such.

    Viewing 15 replies - 16 through 30 (of 39 total)