Search results

  1. I

    Follow hyperlink from string

    Do not use the Access hyperlink function. Using the Windows API: 'Code in the module Private Declare Function ApiShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As...
  2. I

    Show users logged into the Access system

    It is best to use the field name, code like this, then check the number of columns list box of 4. Sub ShowUserRosterMultipleUsers() Dim cn As New ADODB.Connection Dim cn2 As New ADODB.Connection Dim rs As New ADODB.Recordset Dim i, j As Long cn.Provider =...
  3. I

    Recordset

    If the data type of the order-id field is numeric: strSQL_AZ = " SELECT [order-id], [buyer-name],[buyer-email],[recipient-name]" _ & ",[ship-address-1],[ship-address-2],[ship-city],[ship-state],[ship-postal-code]" _ & " FROM ORDERS_AZ_Order_Header" _...
  4. I

    Open File

    Try with this function: Public Function OpenFile(Optional InitialFileName As String) As Boolean Const msoFileDialogFilePicker = 3 Const msoFileDialogViewPreview = 4 'if InitalFileName is a exists file,open it If Dir(InitialFileName) <> "" Then Shell "explorer """ &...
  5. I

    Rectangle.HorizontalAnchor Property Issues

    Object variable, you must use the "Set" keyword. Dim rect As Rectangle Set rect = Me.rectNegative In addition, you sure rectNegative is a rectangle control ?
  6. I

    VBA to make one of 2 text boxes visible based on date

    If #2010-10-01# <= Me.txtDate And Me.txtDate <= #2011-09-30# Then Me.TextBox1.Visible = True Me.TextBox2.Visible = False ElseIf #2011-10-01# <= Me.txtDate And Me.txtDate <= #2012-09-30# Then Me.TextBox1.Visible = False Me.TextBox2.Visible = True End If
  7. I

    Problem with Search Button

    Before code is not entirely correct, because it is only open the form, and then do nothing. The right code should look like this: DoCmd.OpenForm FormName: = "FormName", WhereCondition: = "FirstName = '" & Me.txtCriteria & "'" (If the open form has record source) Oh, I do not understand...
  8. I

    Problem with Search Button

    Write code like this may make it easier for you to understand and identify problems. Private Sub Command12_Click() If Len(Trim$(Nz(Me.cboType))) = 0 Then MsgBox "Please select search type.", vbInformation Me.cboType.SetFocus Me.cboType.Dropdown Exit Sub...
Top Bottom