Search results

  1. B

    Crazy Query

    I have a series of queries to get all of the information I'm looking for. Eventually, all of this information will go into a crosstab to show earnings across multiple jobs for each piece of equipment. However, I've hit a stumbling block. I need to be able to do a dlookup using a result from a...
  2. B

    DAO Loop

    I have created a loop which seems to work perfectly. The AddSQL bit prints perfectly to the intermediate window. However, the DoCmd.RunSQL doesn't seem to work, and I can't figure out why. Any help is appreciated! Private Sub Form_Load() 'Add all new entries from Default schedule to "temporary"...
  3. B

    Help with DAO.Recordset

    I'm having a little trouble figuring something out, but I'm sure some of you experts can help. I have a table which is basically used to fill in a form (tbl_RateSchedule_NEW) and is spit back out as a new table. This part all works great and code isn't included below. The problem is, there's...
  4. B

    SQL Help

    I've looked over this bit of code so many times and have no idea what I'm missing... here's hoping a fresh pair of eyes'll catch it! 'BEFORE THIS IS A BUNCH OF STUFF TO MAKE SURE NONE OF THE VARIBLES ARE NULL 'Save Record to tbl_EquipmentList 'Set Up Strings Dim ID As Variant ID =...
  5. B

    Remove special characters

    I've come across a slight problem and was wondering what approaches others have used to solve it... I have a Memo field that is used to be a description of a document. I don't know what the user will put in (could be anything), but it is eventually passed in a string to a query, etc. The...
  6. B

    Button not working

    I have a button that isn't running any code on click and I can't figure out why. Other buttons on the form work great, and code runs on load. Does anybody have any suggestions? Thanks in advance! Code is: Private Sub btn_Upload_Click() 'Check UploadType Dim RecDist As String RecDist =...
  7. B

    Help with CreateQueryDef

    Essentially, I am trying to pass a string to the CreateQueryDef so that I can use the results of my sql to set rowsources dynamically on a form. However, I have not used this function before and am having trouble getting it to cooperate. I'm sure this is a simple fix for those "in the know". The...
  8. B

    SQL Help

    I need help creating a query. I'm trying to show only the largest Revision number for each "trimmed" RecordName (the last bit of each Record Name is Rev. 1.0, 1.1, etc- hence the trimming). Using this query as "Query2": SELECT tbl_Records.RecordName, (Left(tbl_Records.RecordName,17)) AS...
  9. B

    Reset rs for comboboxes VBA/SQL

    I have a form with many comboboxes. The comboboxes need to have their original rowsource set to a table in my database. However, when the user selects a value in a combobox, it is programatically fed into a SQL string which serves to populate a subform. This part all works great. However, I'm...
  10. B

    Help with SQL pass-through to subform

    I have a form (frm_REVFinder) with multiple unbound comboboxes. All of the comboboxes have a row source located in tbl_Records. I am trying to filter a subform (subfrm_REVSelector) using these comboboxes. I've been trying to get this set up and have the SQL pass-through working. However, I...
  11. B

    Help with copying/renaming file

    I haven't used FSO before, and it seems that the syntax is a little different than typical VBA for strings, but I can't quite figure out what I'm doing wrong here... I keep getting a "file not found" error on the "FSO.CopyFile..." line. I have printed all of my strings to the immediate window to...
  12. B

    Syntax Help

    I'm trying to figure out the proper syntax for this SQL statement, but have hit a wall (and: No. More coffee did not help). Any help would be great! Thanks! Private Sub btn_Cancel_Click() 'Turn warnings off DoCmd.SetWarnings (WarningsOff) 'Run Append Query for Canceling Document 'Set...
  13. B

    Help with SQL statement in VBA

    I have a SQL statement that worked just fine until I tried to add an extra field to my append query. I can't figure out what I'm missing, but I continue to get a Error 3346: The number of query values and destination fields are not the same. I'm sure somebody with better eyes can find the...
  14. B

    VBA String to Query

    I am trying to pass a string that is created via VBA into an append query, but can't figure out where I'm going wrong. Any help would be appreciated, as I will be trying to do this sort of thing a few other times throughout this database. When I try to run it, it asks for NewRecordNumber in a...
  15. B

    Export to Excel: Runtime Error 3061 !!!HELP!!!

    I am trying to export a query to excel. I have used this code minus the SQL portion (those queries did not require input from a form) for other queries to do the exact same thing. I have multiple queries that will require input from a form, and believe that if I can solve this first one, the...
Top Bottom