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 Mike Lewis 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. Leeeon

    Problem with OpenRecordset

    Thanks for quick replies. You were right JerryKlmns. The ADO 2.1 reference was listed first and so had priority. My other databases were converted from Access 97 to XP, and so didn't have the ADO 2.1 reference, hence why they didn't require the DAO.Recordset ref. Thanks again.
  2. Leeeon

    Problem with OpenRecordset

    Looking at another thread has given me the answer: Instead of Dim MyRs as Recordset I needed to use Dim MyRs as DAO.Recordset Still seems strange that my other databases worked ok though!?
  3. Leeeon

    Problem with OpenRecordset

    Hi I'm using Access XP, and having a problem with the OpenRecordSet method. If I try the code below, I keep getting a type mismatch error at the 'Set MyRs' line. Function testit() Dim MyDb As Database Dim MyRs As Recordset Set MyDb = CurrentDb() Set MyRs = MyDb.OpenRecordset("MyQuery")...
  4. Leeeon

    Show Totals on Details Line

    Thanks dhookom. That worked perfectly. randysmid: Had a quick look at Access help but couldn't find anything that referred to this. Will try when have some spare mins. Thanks anyway.
  5. Leeeon

    Show Totals on Details Line

    Is it possible to force Access to print the totals from a group_footer next to the last entry in the details line eg assume Apples and Pears are two records from Details Section, and Total is sum of two in Fruits_Footer, I want report to look like: Apples 24 Pears 12 Total: 36 Instead of...
  6. Leeeon

    Filtering for all records

    As dhhookom said, it depends how you are filtering the records. If doing via the query you can set the parameter to 'Like *' which picks up everything. If via the report itself set the Filter On property to False ie me.filteron = false within On Open Event, or empty the Filter property ie...
  7. Leeeon

    Combo box value problem

    Think the problem lies with the formatting. Your query is expecting a string as the parameter, but Job_Ref is an autonumber, even with the formatting! What's happening is Access is still storing Job_Ref as a number, it just formats on the fly to make it look like a string eg Stored as 12345...
  8. Leeeon

    How do Import an ODBC table using VBA?

    The solution is to copy the contents of the whole table as a simple Make Table query: First create an ODBC link to the Sage table (I've used 'scheme_stockm' in this example) Then create a Make Table query to import this data to a new table (I've called new table 'Stockm_Import') SQL: SELECT...
  9. Leeeon

    Locked Excel Sheet

    I am using Excel 97 on Windows XP. Every now and then I get an error which causes Excel to shut down. If that isn't bad enough, when I then go to re-open the file I get a message: FileXYZ.xls is locked for editing by 'Leon' and I can only open the file in read-only mode. I'm 'Leon' and the...
  10. Leeeon

    Import from multiple ODBC's

    I may be wrong, but I don't think Access gives a way of accessing specific tables through VBA. I use ODBC a lot through Lotus Notes, and have found I need to link each table manually through File -> Get External Data -> Link Tables. If there is a way of doing it in VBA I'd be very interested.
  11. Leeeon

    I lost the form

    Have you got any data entered for the form? Enter some dummy data directly in the Source Table and see what happens.
  12. Leeeon

    Please help with Type Mismatch error!

    Just checked the code and it works ok. Are you entering the call directly in the OnCurrent Event box or as an EventProcedure? It should be directly in the box and Access should reformat it to look as: =DisableEnable([Form]) ie there should be square brackets around the word Form. HTH LeonH
  13. Leeeon

    Resetting &Pages after group

    Cheers. That worked perfectly. LeonH
  14. Leeeon

    Resetting &Pages after group

    I have a report that prints information grouped on different departments. At the bottom of each page I have the standard 'Page 1 of 20' footer using &Page and &Pages. For each group I would like to be able to print the number of pages for just that group and then reset it for the next group eg...
  15. Leeeon

    use calculations on text data types

    Add a new unbound textbox and call it 'Average'. Add your command button and in the OnClick Event enter me!average = (val(me!quarter1)+val(me!quarter2)+val(me!quarter3)+val(me!quarter4))/4 Now when you click the button it'll display the average on your form.
  16. Leeeon

    Hiding control in subform

    You can try doing it in code. Add this to the OnOpen event of your main form: forms!mainformname!subformname!subformfieldname.visible = False NB: The subformname is the name of the subform control on the main form, which may be different from the actual name of the subform (if that makes...
  17. Leeeon

    eliminating error message about append query

    You need the SetWarnings command. You can either use it in VB code or the easiest way is to use a macro. Create a new macro and enter the following: Action Action Argument SetWarnings No OpenQuery Name of your query SetWarnings Yes You need the last line to turn the...
  18. Leeeon

    Expressions in query field to filter data

    The syntax you are using is correct. Is this in the criteria row for the query? Just a few things to check: Is the combobox unbound? Are you referencing the actual name of the combobox ie the name listed under 'Other' in the Name box. Is the form 'Active' when you run the query? Have you...
  19. Leeeon

    Access Report/Query Conundrum

    If I understand correctly, you have all the different courses in 40 different fields, and you want to bring these all together into a single field for reporting on. I would use a union-query to bring all these fields together. Create a select query containing employees #ID (I assume this is a...

Part and Inventory Search

Back
Top