Search results

  1. A

    Update Rows Where Checkbox = True in Subform

    I have a sub form which I use to update data in a table if the user selects the check box. This works fine except that I want to make sure that the user selects a button on the main form, so I want to update those records which have been selected on the sub form with a "Report Created" in my...
  2. A

    Find Duplicates Not Working

    I have an issue where two fields are exactly the same but do not show as duplicates. I checked for empty spaces and next lines, which I know cause this problem but everything is fine. Has anyone come across this issue? The original data in my database which I am trying to compare to was...
  3. A

    Syntax on Multiple Criteria in Where Statement

    I need help to get this syntax right. I have something similar that worked before to open a report but now I am using the same code structure on opening a form and I can't get it. [prikey] is an autonumber and that has given me trouble before with the syntax. [EstimateFlagCleared] and...
  4. A

    Find If a Field Contains a Number in the String

    I am looking to find if a field contains a number and then build a case statement depending on which number is found. The field will contain data just like this: Here is my code that did not work: If Me.txt_work_comm1 Like "*Hybrid" Then 'Sets up auto priced based on number of...
  5. A

    Query to Show Field Based on Last Record ID

    I am looking to get a query to show my list of customers "Grouped By" [CustomerName], that show only the single [CurrentBalance] field for each customer based on the "Last or Highest" [RecordID]. Also, each customer can have up to 4 different [StockType]'s but at least 1 [StockType].So my...
  6. A

    Procedure Too Large! Suggestions Please

    I have this code that is giving me a compile error for procedure too large. Any suggestions on how I can keep the functionality but reduce the code? I already changed many If statements to case statements under the suggestion that they are more efficient. Here is just one set of code of 10 in...
  7. A

    Format Expression Field as Currency

    I have this expression I created and I want to know how to format it as currency. I know how to do it with a regular field but the option is not available for an expression. Any help would be great. The expression: Charge: IIf([Rate] Is Not Null,[Rate],"0.00")
  8. A

    Join Tables - Missing Data

    I have 2 tables: one for repairs and the other for the billing for those repairs. There is a foreign key(record_num) in the billing table to match the primary key(prikey) in the repairs table. This works fine as long as the unit repair has been completed. Now an employee wants to see records...
  9. A

    Between Dates in Where Clause

    I have this code below which pulls a report based on the current date, I wanted to be able to pull the same report by entering between 2 dates as is done in a query using parameters. Thanks for any help. reworkWhere = "ReworkTech = '" & Me.txt_tech_by_date_techid & "' And ReworkTimeOut =...
  10. A

    AND in Where Condition

    I got this code to run correctly, which pulls records where they are not junk(can be seen at end of where condition), the only issue is that the "AND" does not turn blue. Is this a problem? If Not IsNull(Me.txt_last_rec_id) Then 'DoCmd.SetWarnings = False SQLText = "INSERT INTO tbl_batt_id " &...
  11. A

    SQL Insert

    I have a field [record_num] in a table [tbl_batt_id] that can have duplicate record numbers in the table any number of times as a forgien key of sorts. So I would have a group of say 4 records with this same[record_num] in them and would like to duplicate the records but with a new[record_num]...
  12. A

    Visible When Printing

    I am trying to make a label visible on a form during print if a field has "like a string". We use a form so that it prints 3 forms to one page (They are tags for units for repair). I can get the label to be visible in the form view but when I print, the label is visible on every record where it...
  13. A

    Syntax for Open Report with multiple criteria

    I am trying to use multiple criteria in the Where clause of OpenReport. What is the proper syntax? I know I am using the quotes wrong. Can someone please help? Here are 2 attempts at the same code. Which one is correct?: reworkWhere = "ReworkTech = " & Me.cmb_tech_daily And Not...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  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

    Excel Sheet in Access

    I am looking to either embed an Excel sheet into a report/form or have the data in Access export to a pre-formatted Excel sheet. I know how to export to Excel but not how to get it to export to specific cells in Excel. My Excel template(attached) has space for 15 records and the Access data will...
  20. A

    Limit a field to only Alpha Numeric

    I would like to know how to limit a field on a form to only Alpha Numeric characters. Example: ~AAUZNTO This would be scanned by a bar code and I want the field to show only this when scanned: AAUZNTO Any help would be awesome. Thank you.
Back
Top Bottom