Search results

  1. P

    If Then Else struggle

    I didnt get any errors with the code i posted, im using Access 2000. It would be helpful if you could post the db here.
  2. P

    If Then Else struggle

    I just did up a form to test this, and this is what i got which worked for me: Private Sub CmdCalc_Click() Dim NowDate As Date NowDate = Date If IsNull(Me.txtdate2) Then MsgBox "A message" Me.txtResult = NowDate - Me.txtdate1 & " day(s)" Else MsgBox "Another message"...
  3. P

    Deleting a Row from Excel

    I have a button on a form which activates a macro. The macro opens a query in excel, however excel displays the field headings from the table in the data as row 1. So i want to automatically delete this first row containing the field names when this query opens in excel. Any Ideas? :confused:
  4. P

    Escape Key Problem

    Nice one! It works :D
  5. P

    Escape Key Problem

    sorry for being stupid, but wheres the "Error Handler" :o
  6. P

    Escape Key Problem

    I have a button on a form, when clicked opens another form based on a query. If you press the Escape Key while this query is running it comes up with: "Run-Time error '2501'" The OpenForm action was canceled. Debug takes me to: DoCmd.OpenForm "frmInfoPull", acNormal So I need something...
  7. P

    Searching fields from a form

    I managed to work out the solution here :D strWhere = strWhere & " (tblInfo.Organisation) Like '*" & Me.txtDetails & "*' And " & " (tblInfo.Town) Like '*" & Me.txtTown & "*' OR " & " (tblInfo.Company) Like '*" & Me.txtDetails & "*' And " & " (tblInfo.Town) Like '*" & Me.txtTown & "*' AND "...
  8. P

    Searching fields from a form

    (I had posted this in the forms section, but its more of a VBA problem) Im using a search from the sample database: http://www.access-programmers.co.uk...ead.php?t=62853 I have adapted one form so that it has 2 text boxes: txtDetails and txtCity The current code, which works, is this: If...
  9. P

    Searching Multiple Fields From Text Box?

    I have got a bit further with this now :) Im using a search from the sample database: http://www.access-programmers.co.uk/forums/showthread.php?t=62853 I have adapted one form so that it has 2 text boxes: txtDetails and txtCity The current code, which works, is this: If Not...
  10. P

    Searching Multiple Fields From Text Box?

    ok, as an extension of this. I now have 1 text box called "Generic address" which is searching 6 fields to find the strings entered (Based on Michael's idea). It would be handy to keep this text box on the form, and add another one called "Town". The contents of this text box just searches in...
  11. P

    Searching Multiple Fields From Text Box?

    ok, i got Michael's (Ukraine82) suggestion working. Is there actually anyway to speed the search up, as im searching a lot of records?
  12. P

    Searching Multiple Fields From Text Box?

    The only one i could find is: http://www.access-programmers.co.uk/forums/showthread.php?t=62853 by "jfgambit" This only searches one field. Update: found this: http://www.access-programmers.co.uk/forums/showthread.php?t=65331&highlight=quicksearch I'll take a look now
  13. P

    Searching Multiple Fields From Text Box?

    Thanks, but this would only search in 1 field though wouldn't it? I want to search multiple fields, around 6 fields.
  14. P

    Searching Multiple Fields From Text Box?

    I have a table of addresses, and I want to be able to search about 4 fields in this table to find a building name, for example. I want to be able to do this via a form, with a text box. The user enters in the building name, clicks 'search'. Then the results could be displayed in a query or...
  15. P

    Counting Strings?

    ok, my database must be special then ;)
  16. P

    Counting Strings?

    Found the problem, the my IDno field was set to Number :rolleyes: as you said. Sorry, i checked the other fields. It seems to be working now.......I hope :p
  17. P

    Counting Strings?

    The function is exactly the same as urs. Apart from where urs says: "Where [IDno]='" &........." I have replaced IDno for my field name, everything else is the same.
  18. P

    Counting Strings?

    The data is similar, both text. All ive done is use a different table, and change the names of the field names to correspond accordingly.
  19. P

    Counting Strings?

    Its defined as a string: SQL = "SELECT [Vehicle], Count(*) AS [Count]" & _ " FROM qryOne" & _ " Where [IDno]='" & ID & "' and [Vehicle] Is Not Null" & _ " GROUP BY [Vehicle]"
  20. P

    Counting Strings?

    The Error is: Data type mismatch in criteria Expression rs.Open SQL, cnn, adOpenForwardOnly, adLockReadOnly
Back
Top Bottom