Search results

  1. A

    Query Using VBA

    Thanks for the reply. I understand what you are saying but not sure how I would normalize it. I have a table that holds each repair record and has a tech for each section of the repair cycle. Isn't this appropriate since it is work on that record? I am rethinking my attempt and now I am...
  2. A

    Query Using VBA

    I have 3 fields on a table for 3 types of repair techs in a unit repair cycle. I am trying to see query data for a single tech where they can be the tech in any or all of the three fields. The three fields are Rework,Repair, and QC. I have used an "OR" statement to find records that will have...
  3. A

    Last Record(QueryDef or Recordset method??)

    Prikey is an autonumber and whenever I put the code the way you suggested I always get an error. For some reason this way always works but I am never sure to the reason why.
  4. A

    Last Record(QueryDef or Recordset method??)

    Yes. It would not pull the last RMA for me so I changed it to prikey because it is a sequential number(Auto) and this allowed me to then use dlookup to find the field from that record. It is really slow though, so that's why I was inquiring about a better method other than dlookup, such as...
  5. A

    Last Record(QueryDef or Recordset method??)

    Ok, so I followed your changes and I am still getting a record that is not the last. There is a field "prikey" which is a sequential number and when I replace "APS_RMA" it pulls the last "prikey" number, so I set it up with a dlookup because it is the only way I know how. Any better suggestions...
  6. A

    Last Record(QueryDef or Recordset method??)

    Thanks for the help. I got object required as a msgbox this time. My table is a linked table, is this the problem? Here is my code now: ''''''''''''''''''''''''''''''''' 'Opens last RMA into textbox (For opening tag sheet) Dim dbs As DAO.Database Dim rst As DAO.Recordset 'Get the...
  7. A

    Last Record(QueryDef or Recordset method??)

    My question is which method of finding the last record is best, QueryDef or Recordset, and can someone point me in the right direction? Here is my data: Table: tbl_module_repairs Field: aps_rma Textbox to insert last record RMA into: txt_test Here is some code I tried but get an invalid...
  8. A

    Query to Excel. Please Help.

    Thanks for the reply. The function is in a standard module. The parameter value on the query is called "aps_rma" and it is an identifier for the batch of repairs related to one customer. I would want an input box for the user to enter this identifier into and then get the excel sheet, but also...
  9. A

    Query to Excel. Please Help.

    I am having trouble with the SQL method because the module that holds the function is not on the form so using "Me." won't work. I will get back to this tomorrow and also try out the querydef method. Thanks again!
  10. A

    Query to Excel. Please Help.

    Gonna look into this and I will get back with my results. Thanks.
  11. A

    Query to Excel. Please Help.

    Thanks for that. It helped me at least know my data can move from Access to Excel. Now my problem is now to get a parameter query to do this. Maybe I will need a new method? Gonna look into the suggestion of Paul.
  12. A

    Query to Excel. Please Help.

    I have a query I need to populate and Excel template. Basically we log in repairs into Access and then we populate and print a receiving page in Excel. The work is subcontracted so we have to work with our contractor's Excel template. I have found Bob Larson's template for how to do this but I...
  13. A

    Case Method Issue: Whats Wrong Here

    Ok, so I finally have had time to get back to this. Thank you to everyone for their help. Chris's method seemed to do the trick and here is what I got from that: Private Sub Incoming_Module_Sn_AfterUpdate() Dim warrantyCheck As Date...
  14. A

    Case Method Issue: Whats Wrong Here

    My code won't recognize my cases using "Left" but it fires on the "Case Else" options. What am I missing? Second, any suggestions to make this code shorter? This code is firing on a Serial Number Field in a datasheet form. Private Sub Incoming_Module_Sn_AfterUpdate() Dim warrantyCheck As Date...
  15. A

    LIKE in DLookup After Syntax

    I think I got it. I am still open to any suggestions on using a case method as opposed to a If/Else method. If Left(DLookup("[end_user]", "tbl_module_repairs", "prikey = " & Me.txt_rid1.Value), 2) = "TW" Then
  16. A

    LIKE in DLookup After Syntax

    Thanks again for the reply. Can I use the "If Left" function to call specific criteria to find a specific record? My form is all unbound so that I can effect 10 records with one button. As to the table it is my bosses database that I have come into and it is built very wrong. The basics are...
  17. A

    LIKE in DLookup After Syntax

    Thanks for the reply. Here is my code so far. This is just one of 10 because I am using 10 unbound "lines" so to speak to effect 10 records at once when a submit button is entered. This code is for a "apply price" button that applies to all 10 lines: Dim strCriteria As String Dim matchCriteria...
  18. A

    LIKE in DLookup After Syntax

    I am looking to use a "If" statement with DLookup to find a record and see if the field name begins with "TW" as the characters. Here is what I have so far: Dim matchCriteria As String matchCriteria = "LIKE 'TW*'" If DLookup("end_user", "tbl_module_repairs", "prikey = " & Me.txt_rid1.Value) =...
  19. A

    Auto insert of value

    I found that on these forums I get more help if I break down my goals into smaller issues. For example if a wage rate were to change on an employee because of a time period then you would need some code to run on opening of a form or database that would compare the Now() time with the time of...
  20. A

    Limit a field to only Alpha Numeric

    Alright, got back into to work to test this. It works great! Thank you soooo much. Now I can tell that annoying co-worker to eat it. Haha. Cheers!
Back
Top Bottom