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: *

  1. PeteJohnston

    SQL error running Python

    I'm trying to write some code to use Python to create a real Excel 2010 file from one of the iSeries files. I've created a command that accepts an SQL statement and an output location as parameters. It works perfectly when only one file is involved, for example listing all transactions for a...
  2. PeteJohnston

    Append query doesn't work but no errors are generated

    Eventually I found it. Sharepoint did not always tell Access that a field is required or read-only and it fails at the time the record is inserted. The fact that Sharepoint doesn't tell Access that it has failed seems to be ignored. Once I got the field values sorted it inserted the record...
  3. PeteJohnston

    Append query doesn't work but no errors are generated

    Query qryInsertChild is a parameter query that reads one record from a table with a specific ID and inserts a record into the same table but with different dates. The ID is an auto number field and is the primary key. Running the query interactively prompts for three parameters, the ID and two...
  4. PeteJohnston

    Append query doesn't work but no errors are generated

    I have a query that accepts 3 parameters and should insert a record into a linked table. It doesn't kick up any errors but it doesn't write the record to the table either. Set qDef = db.QueryDefs("qryInsertChild") qDef.Parameters("Master ID") = txtID ' Process all of the selected records...
  5. PeteJohnston

    Query designer changes field name

    Thanks Duane, that seems to have worked. I change the AutoCorrect options on the back end as a performance aid but I don't usually bother to change the front end. It's strange that it should "correct" a field name to an incorrect name when it was correct in the first place. PeteJ (Contract...
  6. PeteJohnston

    Query designer changes field name

    I've got an Access front end that links to a Sharepoint back end. In the table one of the fields is called [Requestor / Contact] - Note the spaces When I use query designer to select this field and run it from within query designer it shows Okay. When I save the query it changes it to...
  7. PeteJohnston

    Trying and failing to write item to a Sharepoint list

    I tried changing the query to the base table but that did not help. Then I commented out all of the data setup stuff apart from the required fields and tried again. It successfully did the INSERT! I then went thru un-commenting the rest one by one. It did some Okay but failed on others where it...
  8. PeteJohnston

    Trying and failing to write item to a Sharepoint list

    I've been given the task of putting a friendlier front end over a Sharepoint "database". Part of this involves importing test data from an existing Sharepoint list, about 4K records. I'm using liked tables thru Windows Sharepoint Services. If I open the table directly I can key the information...
  9. PeteJohnston

    Access jumps into the VBA code editor for no reason

    Ben You were on the right line there. I put a break point in Form_Current in one of the forms, made a change to the form (added a blank character to the code) and saved it. I then closed the database. I then went back in and when I opened the form it stopped at the point where I'd put the break...
  10. PeteJohnston

    Access jumps into the VBA code editor for no reason

    Remembering an old break point seems likely. I had been checking that it ran through the code like I expected. I'll try the Compile/Compact&Repair option but how do I test that it works? [ponder] It's not consistent so I won't know if it works because I've fixed it or because Access has decided...
  11. PeteJohnston

    Access jumps into the VBA code editor for no reason

    I prefer Break in Class Module myself but break on unhandled has its uses too. My VBA is always well-written with error trapping showing what the error is and where it occurred. I very rarely use On Error Resume Next and certainly not in this case so if I temporarily comment out the On Error...
  12. PeteJohnston

    Access jumps into the VBA code editor for no reason

    At times when my users are working with an Access application it jumps into the VBA code editor for no reason. I say no reason but really I mean I don't know why it does it. There are no errors, no break points, the user isn't debugging the code. In fact, when he sees the VBA behind the scenes...
  13. PeteJohnston

    List out all different character types found in a table

    Woops - typo time! I just noticed that my reference to tblImport2 deletes it after it has finished. That is because I was importing the data from Excel and only needed the table until I had populated tblImport. You probably don't want to delete your table [bigsmile] Also the last sentence...
  14. PeteJohnston

    List out all different character types found in a table

    I had exactly your problem. There were a few problems with character sets but the eventual approach was to create a table tblCharSet with all of the valid characters. I then created a work table with three fields LineID Autonumber Original Memo Changed Memo This concatenates the...
  15. PeteJohnston

    Help needed writing the 'ON' expression of a query

    If you never know the number of fields you could try creating a function to return the field names Public Function FieldList(TableName As String) As String Dim sSQL As String, sReturn As String Dim rst As Recordset, i As Integer sSQL = "Select * From " & TableName Set rst...
  16. PeteJohnston

    pass a method as an argument or somehow call a method of a form from a class

    The class module raises the event. The variable oFileWatcher is defined as a variable in the General section of the form code. As long as you have defined oFileWatcher as WithEvents then all you need to do is kick off the file watcher and wait for the event to happen. As soon as the the form...
  17. PeteJohnston

    pass a method as an argument or somehow call a method of a form from a class

    I take it you have created a class module called clsFileWatcher? You have defined oFileWatcher as a variable of type clsFileWatcher and I don't think there is any problem defining it as Public WithEvents oFileWatcher As clsFileWatcher in the form that is doing the work. Isn't that how the...
  18. PeteJohnston

    pass a method as an argument or somehow call a method of a form from a class

    Woops, Biological Component Failure Should have said "let the class call the form's procedure" instead of "let the form call its procedure" PeteJ (Contract Code-monkey) It's amazing how many ways there are to skin a cat (apologies to the veggies)
  19. PeteJohnston

    pass a method as an argument or somehow call a method of a form from a class

    I think MajP's suggestion is definately the way to go. In the form you seem to want to tell the class which of the form's own procedures to call when it receives a file and let the form call its procedure. Better to have the class tell the form when it has received a file. A class is supposed to...
  20. PeteJohnston

    Data-linked text box has different value than the field in the underlying recordset

    MajP Going by the Litwin and Getz quote it seems that VBA converts the raw data to ANSI before placing it in a variable containing the SQL select command. End result is that the WHERE clause is incorrect. This must mean that passing the select string with rst.Fields("Actual") in the WHERE...

Part and Inventory Search

Back
Top