Recent content by Beansy

  1. B

    Open another database with a button

    you need to replace <error number> with the error number. (Without the inverted brackets)
  2. B

    Open another database with a button

    Use the On Error command. First simulate the case where the database does not exist so that you can write down the error number then try this out: Private Sub cmdOpenTime_Click() Dim accapp As Access.Application Set accapp = New Access.Application On Error GoTo ErrorHandler...
  3. B

    Form with multi-criteria searches, uses strings and filters

    Yea I missed something out. I have made changes to that post so it might work now. Really hard to test when not having a compiler handy :)
  4. B

    Form with multi-criteria searches, uses strings and filters

    This work? Dim queryString As String queryString = "" If Not IsNull(Me.keyword) Then queryString = queryString & "[Item Description] Like '" & "*" & Me.keyword & "*'" & " AND " End If If Not IsNull(Me.HRCombo) Then queryString = queryString & "[HR...
  5. B

    Form with multi-criteria searches, uses strings and filters

    Does my code work? I have been unable to test it so am writing from memory lol. My mistake with the LIKE statement. Try this out StrA = "[Item Description] Like '" & "%" & Me.keyword & "%'" That should return Item Description that contains the keyword.
  6. B

    Form with multi-criteria searches, uses strings and filters

    Me.Filter = StrA & " AND " & StrB & " AND " & StrC & " AND " & StrD Sorry your filter line was wrong too, replace with this
  7. B

    Form with multi-criteria searches, uses strings and filters

    Also it sounds like you're expecting to return multiple records from the queries? If so you're probably better off using a report instead of a form.
  8. B

    Form with multi-criteria searches, uses strings and filters

    Try this out. I dont have MS Access handy so I couldn't test it. Dim StrA as String, StrB as String, StrC as String, StrD as String StrA = "" StrB = "" StrC = "" StrD = "" If Not isNull(Me.Keyword) then StrA = "[Item Description] Like '" & Me.Keyword & "'" End If If Not isNull(Me.HRCombo)...
  9. B

    Tabcontrol form question

    So you have a form that contains a Tab Control? If so, use the following code in the On Load event to open to tab 14 Me.tabControl = 14 note: replace tabControl with the name of your tab control
  10. B

    Issue with filtering report by date

    Yea it's been a slow recovery. City center just starting to thrive now. Job prospects for programmers is excellent here haha.
  11. B

    Issue with filtering report by date

    Be sure to consider visiting Abel Tasman, Wanaka, and Queenstown if you make it to the South Island. Best places in NZ in my opinion if your looking for a mix of scenery and a tourist feel. I hope you enjoy your visit!
  12. B

    Issue with filtering report by date

    The first link worked great thanks!
  13. B

    Issue with filtering report by date

    Access version: 2013 Hey all Didn't really know whether to put this one in Report forum or Query forum as it kinda applies to both but is regarding a query for the filter property of a report so put it here :) This is a fairly weird issue that has had me stumped most of the morning. I have an...
  14. B

    Type mismatch issues. Creating Report based on checkbox selection

    Okay ive come up with easier to read code but still not working. Though this code executes and the Report is created but with no entries. Private Sub CreateReport_Click() Dim DocName As String DocName = "AllCustomers" DoCmd.OpenReport DocName, acPreview, , "TypeOfWorkServicing=...
  15. B

    Type mismatch issues. Creating Report based on checkbox selection

    Private Sub CreateReport_Click() Dim Serv As String Dim Manu As String Dim Boil As String Dim Steam As String Dim Hot As String Serv = "[TypeOfWorkServicing] = '" & Me!Servicing & "'" Manu = "[TypeOfWorkManufacturing] = '" & Me!Manufacturing & "'" Boil = "[TypeOfWorkBoilers] = '" &...
Back
Top Bottom