Search results

  1. T

    Default field content based on different table

    Sorry if this seems like an obvious question, I have a pretty straightforward idea of what I need to do, I just can't figure out how to do it! I think it may need the dlookup function but I never can get that to work properly! I have a form based on a table. One field, Max Passes and another...
  2. T

    Searching for a word within a record

    But that just tells me what position in the field that the searched word is. How do I utilise that to show an entire record based on if it appears at all?
  3. T

    Searching for a word within a record

    I am trying to create a form that will search my table for any records where a specified word appears in a specified field. Both searchable fields are memo fields, and can have lots of words in. So what I want is for the user to be able to select field1 from a combo box, then type in "word"...
  4. T

    Printing a subform

    I have a form with a few buttons, and a subtable that is linked to my main table, and displays a whole lot of data in table view. What I need is to be able to print the table in the same format. Is this possible? If it is possible at all to print a table in table format, then that would be...
  5. T

    Date plus three

    Nice and easy, Thanks!
  6. T

    Date plus three

    Hi, I have a date field called bookedindate, another field called supplier, and another called bookedoutdate. What I want to happen is, if a certain supplier is chosen, the bookedoutdate automatically changes to 3 days after the bookedindate. I'm okay with most of the code, it's just how to do...
  7. T

    Custom error codes

    I have a piece of code that opens up a form and displays the record by an ID the user specifies in a text box. If the box is empty and they press the button, it errors and opens the VBA code. Obviously this is not something I want the user to see. Firstly I tried an if statement so if the text...
  8. T

    Dlookup help?

    It worked! Thank you :)
  9. T

    Dlookup help?

    Ooooh I get it. I'll give it a try.
  10. T

    Dlookup help?

    Oh sorry, I left that part of the code out. tempID is an integer variable that is assigned a number earlier on in the code. The page you linked to says it can be a number, a string or a date, doesn't it?
  11. T

    Dlookup help?

    Nope, I've already looked up all the syntax, and I think it's right anyway, because the code is not erroring. It's just not producing the correct results.
  12. T

    Dlookup help?

    Hi, I've searched through previous dlookup threads, but nothing seems to work. I have the following code: If IsNull(DLookup("[Type of QC 2]", "Priorities", [ID] = tempID)) And IsNull(DLookup("[Type of QC 3]", "Priorities", [ID] = tempID)) Then Forms.frmQCReport.txtQCID = 1 End If...
  13. T

    Adding a new record with certain fields filled

    I want to have a button that will create a new record in my table, and populate a couple of the fields with certain data. Is there a way I can do this using vba?
  14. T

    Working with dates in vba...

    OH MY GOD. I think I may have just figured out what it is. I cannot believe this. I'm so stupid. I was playing with different date inputs trying to find a pattern for the returns it was giving me.... and I realised, the date format is MM/DD/YYYY, not DD/MM/YYYY as we use here in England. I'm...
  15. T

    Working with dates in vba...

    I see what you're saying. The checking each text box code is earlier on, I didn't put it up because it works perfectly. But I see now, I wasn't putting the AND on the end of the date part of the string. So now I have added & " AND " onto the end of the date part, and left the code to remove the...
  16. T

    Working with dates in vba...

    I'm running Access XP. I copied the ConDateFormat code from the tutorial posted earlier in this thread; http://allenbrowne.com/casu-08.html I remove the last 5 characters because it is a search with multiple criteria, and for each populated text box in the search form, I add to the string. So...
  17. T

    Working with dates in vba...

    Private Sub btnSearch_Click() Dim strFilter As String Dim varItem As Variant strFilter = "" If Not IsNull(Me!cboOpen) Then strFilter = strFilter & "[Job Open]=" & Chr(34) & Me!cboOpen & Chr(34) & " AND " If Not IsNull(Me!cboStatus) Then strFilter = strFilter & "[QC Status]=" & Chr(34) &...
  18. T

    Working with dates in vba...

    Unfortunately the field in the table is already set to date/time format, which means it's something else. Damn.
  19. T

    Working with dates in vba...

    Good find. Still not working for me though :( The code runs with no errors, but the results in the subform never work correctly. The subform is pulling from a table, is it possible there is some problem with the date setting on the table not corresponding to the date setting on the form? They...
  20. T

    GoToRecord help

    YES! It worked. Thank you so much!
Back
Top Bottom