Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: CopperWire
  • Order by date
  1. CopperWire

    Error Handling

    Thank you so much for your help. I've put the code below in: The error is occuring, I know this because when I step through the code it stops at (If Err = 3022 Then '(duplicate Key)), but then it jumps to the else statement. The record doesn't get added if duplicate, but does if not. Any ideas...
  2. CopperWire

    Error Handling

    How do I handle an error within the append query? I know the error that I want to handle is conDuplicateKey = 3022, which is a duplicate key error, but I don't know how to reference this error. Can I even do this is a DoCmd command? My code is below, any help would be great! Private Sub...
  3. CopperWire

    Set Criteria for a Query in a Module

    That worked, thank you so much. I also didn't know you had to declare variable separately. Thanks for that. So, now I open my form type in the WR and the code runs and adds the information to the table. Now how do I get my form to populate based on what I just added to the table? The only...
  4. CopperWire

    Set Criteria for a Query in a Module

    I don't understand how this will help? Are you saying that this single1 table should be linked in the query that I'm running? How do you populate the table? Sorry not getting it!
  5. CopperWire

    Set Criteria for a Query in a Module

    Yes, the form is open. I tried passing the WR number from the form to the module and it worked (at least is psses), but still not recognized. See below Sub GetRefundData(EnterWR) Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim strSQL As String Dim intEnterWR As Variant intEnterWR =...
  6. CopperWire

    Set Criteria for a Query in a Module

    I'm currently using a form to set the criteria in a query and I'm wondering if there is a way to do that with a module. Specifically, I want to change the CD_WR using a form. The SQL is below: Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim strSQL As String strSQL = "SELECT WRInquiry.*...
  7. CopperWire

    Getting Data from a Subform into a Table

    Thank you PHV. I still get a syntax error. Can you use this command to insert records into a table from a form? What I'm trying to do is populate the OP Unit field in the subform with the parent form, which is based off a query in order to save the data from the query and the data from the...
  8. CopperWire

    Getting Data from a Subform into a Table

    After reading some other posts, I came up with the code below, but I'm getting a syntax error. Can anyone help. CurrentDb.Execute ("INSERT INTO Refund Customers(ChCSSPremiseNumber, Op Unit) VALUES (" & ChCSSPremiseNumber & ", '" & Forms!RefundableForm![Op Unit] & ");") The...
  9. CopperWire

    Manipulate Pivot Table Criteria Using VBA

    Thank you for your help. You may thought that I forgot about this post, I didn't, have had some issues, just now getting back to it. Thanks again!
  10. CopperWire

    Getting Data from a Subform into a Table

    I've got the main form, which is populated via a query. The subform that's on the main form is based on the table that I want to populate. The subform contains records that users can change (just certain ones) and it also contains all the records in the table. The records the user can not...
  11. CopperWire

    Manipulate Pivot Table Criteria Using VBA

    I probably didn't explain very well. What I want to do is to be able to filter the pivot based on criteria selected on a different sheet. This is a budget file, so if someone chooses month 10, then I need months 1 - 10 to be displayed on the pivot, but not months 11 and 12. I would do this...
  12. CopperWire

    Manipulate Pivot Table Criteria Using VBA

    Is there a way to reference the data in a pivot table field in order to manipulate the data. For instance. I have a month field and I want to be able to choose a month "say month 10" and have the month fields on my Pivot table show Month <=10, so 1-10, but "click off" months 11 and 12. If...
  13. CopperWire

    Access Replication Problems

    I tried this again and the date ran field didn't change, so I'm not sure why it happend the first time. I will keep changing and syncronizing and see if it happens again. I am brining in a text file and using a recordset to manipulate the records. The code is quite lengthly. Thank you for...
  14. CopperWire

    Access Replication Problems

    I'm trying to make a design master of a database so that I can update the database on a citrix server and replicate the changes to another server. When I replicate the database my autonumber field value changes from Increment to Random. Also, I have a Date Ran field that enters the current...
  15. CopperWire

    [ODBC Microsoft Access Driver] Error

    It seems to be a data problem. We were able to get around the error by doing the following. We created a make table from the query. Then we converted the data type of the problem column to text and back to a number. Then it works. I don't know why this happens, but it does frequently...
  16. CopperWire

    [ODBC Microsoft Access Driver] Error

    I'm able to run a query in Access successfully but I get a driver error when I try to access the query in Excel. I'm trying to use the query to create a pivot table in Excel? The error message is "[Microsoft] [ODBC Microsoft Access Driver] Invalid value for cast specification on column XX."...
  17. CopperWire

    ODBC Microsoft Access Driver Error

    I'm able to run a query in Access successfully but get a driver error when I try to bring it over to Excel in a pivot? The message is "[Microsoft] [ODBC Microsoft Access Driver] Invalid value for cast specification on column XX." Any ideas?
  18. CopperWire

    Apostrophe problems

    Found a solution!! Use the following (If-EndIf) code for the fields that may contain an apostrophe: strWRDesc = Mid(strLine, intpos + 1, intpos3 - 1) If strWRDesc = "*'*" Then strWRDesc = Replace(strWRDesc, "'", "") End If This will remove the apostrophe from the text...
  19. CopperWire

    Apostrophe problems

    Getting RunTime Error 3075 when it encounters an apostrophe. Here's the code: Sub GetElecRawdata() Dim strLine As String Dim strBudYr As String Dim strDist As String Dim strRegion As String Dim strResZn As String Dim strSerAreaCd As String Dim fso As New Scripting.FileSystemObject Dim ts As...
  20. CopperWire

    Apostrophe problems

    While reading in a text file using the scipting.text string, I get an error when and apostrophe is encountered. Any ideas how to ingnore apostrophe's?

Part and Inventory Search

Back
Top