Search results

  1. B

    Finding substring in text field with a specific format

    There is no built-in Access-VBA function for this of which I am aware, but since you say you are comfortable using VBA, you could try something like: Public Function MyFunction(ByVal strArg As String) As String Dim lPos As Long strArg = " " & strArg & " " For lPos = 1 To...
  2. B

    Store data in multicolumn listbox from a text file

    You might check the value of myArray(i) at the point that the error is triggered. If the element contains no text, this means that the code is trying to parse an empty line at that position in the input text file. For example, a file with: Field1,Field2 1,One 2,Two 4,Four ...will fail on...
  3. B

    Strange problem with Access ADODB connection to SQL Server

    To identify possible causes, we would first have to know which library(ies) you had to remove from the references. Care to share more details?
  4. B

    Strange problem with Access ADODB connection to SQL Server

    For the Windows 7 computers exhibiting problems, are they, by any chance, pre-Service Pack 1?
  5. B

    Detecting modifier keys inside a button's On Click event

    @Pat, Regardless of what the loop is for, there are two things that are clear from the OP: One: It is a loop of code running from a button's Click event. In that scenario, the button control has the the focus, and a button does not have a Change event to be triggered as you describe. Two...
  6. B

    Detecting modifier keys inside a button's On Click event

    Within your For...Next loop, you might try inserting a DoEvents statement before your GetKeyState statement.
  7. B

    Hide/Unhide database window with VBA code

    @Insane_ai: If you have "certain users" who are allowed to use the MDB instead of the MDE, could you not simply modify your code not to hide those objects from them when they are in the MDB as opposed to the MDE? Even so, giving any end-user level of access to the MDB file is frowned upon, as...
  8. B

    Out of memory

    @Acropolis, You should not be doing any design changes to any objects in the database at the same time that you have database code running (ref. hidden and landing forms). Not only could this cause Out of Memory issues; you could end up corrupting the database.
  9. B

    Recordsets

    @arnelgp Ahh, you're right, my bad, I misfired on the line insert. Thank you for the correction.
  10. B

    Recordsets

    Hello, RevJeff, Your outer loop checks for EOF on the recordset, but your inner loop needs to check for it also. Might I suggest the following amendment to the inner loop? Do Until rs.Fields("CellExt") <> Cell Text = Text & " " & rs.Fields("DriverTime") If rs.EOF = True...
  11. B

    Runtime Error 3027

    That should be: strSQL = "SELECT * FROM COPY_TBL_LEDGER_DETAIL WHERE " & Me.txtFilter & ";"
  12. B

    MS Access to DB2 using DSN-Less Connection

    Check out the following link: https://www.connectionstrings.com/ibm-db2/
  13. B

    Change from early to late binding in access form

    For the txtbrowse_Click sub, I recommend the following edit. This should help you avoid the necessity for the additional Reference: Private Sub txtbrowse_Click() ' Add these two lines Const msoFileDialogFilePicker = 3 Const msoFileDialogViewDetails = 2 Dim strButtonCaption As String Dim...
  14. B

    Filesystem object - finding folder?

    You do not need the FileSystemObject for this task; you can use the Dir command, like the following example: Dim vFolderName As Variant vFolderName = Dir("C:\MyParentFolder\*xyz*", vbDirectory) Do While vFolderName > "" Debug.Print vFolderName vFolderName = Dir Loop
  15. B

    Error pasting worksheets using Access VBA

    My mistake, that line should read: wkBkObj.Application.CutCopyMode = False
  16. B

    Error pasting worksheets using Access VBA

    Try the following code change, from: xlSheet.Cells.Copy wkBkName.Worksheets(1).Paste ...to: xlSheet.UsedRange.Copy wkBkName.Worksheets(1).Paste Application.CutCopyMode = False
  17. B

    Merging PDF Files with PDFCreator

    Have you considered Stephen Lebans' ReportToPDF? You can use the MergePDFDocuments function to accomplish the same thing.
  18. B

    Unable to edit query with an unselected subquery

    You might try: SELECT tblPropertyDetails.PropertyID, tblPropertyDetails.BarmentSentDate, tblPropertyDetails.BarmentDeadline, DateAdd("yyyy", 1, [tblPropertyDetails]![Sale]) AS RipenDate FROM tblPropertyDetails WHERE EXISTS ( SELECT qryClosed.PropertyID FROM qryClosed...
  19. B

    Unwelcome "Enter parameter value" Dialogue box

    Try changing: Forms!frmTraining!txtTrainingID ...to: Forms!frmClient!subTraining!txtTrainingID
  20. B

    Opening another DB in Access Runtime

    The issue is in the statement: Set accapp = New Access.Application ...or: Set accapp = CreateObject("Access.Application") The Access.Application object instance can not be created in the Access Runtime VBA environment.
Back
Top Bottom