Search results

  1. H

    Find and Delete (all but 1) Duplicate Records from Table with VBA

    I want to find duplicate records of one field in a table and delete all but one of the records using VBA. I was thinking of using: CurrentDb.Execute "DELETE * but I'm not sure how to put what I want after that. I did use the Query Wizard and was able to get the duplicate SQL needed: SELECT...
  2. H

    Best way to add same field for different dates?

    I am trying to think of the best method to add the same field across multiple dates. The user would input a beginning and end date (possibly on a form), and a total would appear on the report. What is the best way to go about this? Thanks.
  3. H

    " is not a valid name (Error 3125)

    @MSAccessRookie thank you so much! I realize the other queries aren't included, but I didn't think about the aliases! I will try this soon and report. Thanks again.
  4. H

    " is not a valid name (Error 3125)

    SELECT [Process-Q50]/([tblFluidSum]![Vol% Oil]/100) AS [Process-Q48], ([Process-Q82]*[tblFluidSum]![SG Base Fluid])*6.29 AS [Process-Q50], [Process-Q81]/1000 AS [Process-Q82]...
  5. H

    " is not a valid name (Error 3125)

    I have a query that is made up of calculations based on some basic numbers from a few tables (which all have relationships to one main table). Initially, I had about 8 other queries that all linked into this one. I checked those queries to see if the problem stemmed from there, but they run...
  6. H

    Crazy Calculation continues to get Syntax Error

    Sorry, I'm a little slow right now. So I create a query (MyQuery) with the calculations I would need for a larger calculation. Then in my main query I can reference MyQuery and use them. I understand MyCalc's calculation, but I'm not understanding OtherCalc: [Field4], [Field5]...
  7. H

    Crazy Calculation continues to get Syntax Error

    Thanks for the quick response. So in essence, I can't create smaller calculations and use them in one large calculation within the same query? How would I go about using them if they were in a separate query? Would I need to use VBA? Thanks again!
  8. H

    Crazy Calculation continues to get Syntax Error

    I was given an Excel Workbook where I needed to breakdown some calculations for an Access database. Normally they would start simply enough, but once broken down into their basic inputs, they would be huge. I would then place them in a query and use them as such. However, I am stuck on one that...
  9. H

    Internal vs. External Queries

    I am not sure if the terms I am using are correct but I'll explain what I mean. Internal Query: A query that is built-in to a form or report. It does not display under the list of queries on the right side and can therefore not be referenced for other forms or reports. External Query: A query...
  10. H

    Combobox FindRecord Issue

    I have a combobox on quite a few forms that finds a record based on the UserID and Date. Once a date from the combobox is selected it is meant to display the corresponding values on the form. On some of the forms this works perfectly. On other forms it does not. What could be the reason for...
  11. H

    3134 Error - Code works for other forms??

    Thank you, I should've noticed the MudType, but didn't know about % signs.
  12. H

    3134 Error - Code works for other forms??

    I am having a problem with the code from Allen Browne's copy and paste for the main & subform (http://allenbrowne.com/ser-57.html). I have used this code successfully in one of my other forms. The only difference is the subform table and fields. This is the code as it is right now: 'On Error...
  13. H

    Best Method To Find & Delete Record In Table According To Field Criteria?

    I have the code on a back button for my form so that when the person leaves the form any record without a date they created will be deleted. However, on that same form I have Allen Browne's method to copy values of a main and subform to a new record (http://allenbrowne.com/ser-57.html). It...
  14. H

    Best Method To Find & Delete Record In Table According To Field Criteria?

    Thanks, I was able to use SQL and execute it in VBA. It has created another issue, but I'll try to figure out.
  15. H

    Best Method To Find & Delete Record In Table According To Field Criteria?

    I am wondering what is the best method in VBA to find a specific record, or records if need be, and then delete it? More or less, I need to find records that do not have a date in their date field and have them deleted. I was trying some recordset ideas, but none worked. I also was thinking of...
  16. H

    Copy values of Main and Subform (only main form working)

    The 40-50 are for the subform. The main form will always have those few items. There will be some forms with multiple subforms. Originally there were no subforms and the checkbox would just copy everything on the main form to a new record with the runcommands. However, I needed to normalize...
  17. H

    Copy values of Main and Subform (only main form working)

    At the most, maybe 40-50 fields at a time.
  18. H

    Copy values of Main and Subform (only main form working)

    I will need to copy a bunch of fields as there are other tables and forms/subforms with much more fields. I just have been using this table to test with until I was able to get a method to work.
  19. H

    Copy values of Main and Subform (only main form working)

    Sorry, the code is in frmSTOTAct. frmUserID is meant to be first, which you then plug in 0004 for the UserID. This will open up frmSTOTAct.
  20. H

    Copy values of Main and Subform (only main form working)

    I have uploaded the part of the DB I am working on. I really appreciate the help. This has been very troublesome for me. The code rests in the checkbox.
Back
Top Bottom