Search results

  1. M

    Use table data based on form field selection

    Perhaps a Union query ... Why have 4 tables? If you really want to query each underlying table depending on the form you could: Build a union query from the 4 tables and base your form on that Build an SQL-based recordset in code Neither approach is elegant. An alternative approach would be...
  2. M

    Counting records using SQL and writing to a table.

    Countif conditionally sum(iif(fldCharacter="C",1,0)) This counts the number of C's etc. So n periods can be counted in 1 query but the repeated function calls overhead may be a problem.
  3. M

    query to show table structures in database

    Link above broken ... The link above refers to a broken link that gives me a 404 error from http://snow.he.net/cgi-bin/error404 http://www.access-programmers.co.uk/ubb/Forum2/HTML/000896.html Should the link be broken? How do I re-find the information?
  4. M

    More ODBC Nightmares and Migranes

    Oracle 30 record limit .... WARN: I am not an Oracle DBA but I do have Access 97 interrogating an Oracle 8i database via ODBC. There are options as somewhere in the ODBC setup that says 'only return X records' at a time. This usually has no effect because the query returns multiple 30 record...
  5. M

    Automating Macros

    Sybase, Replication and editing msysobjects tables Koen, I have never used Sybase or Access replication. The last time I edited a msysobjects table I did it by ploughing through an ODBC connection setup, supplying passwords when offered to get the right connection string and then just did an...
  6. M

    Automating Macros

    Different problem: ODBC passwords vs. Access passwords Koen, To avoid the passwords for the connected Oracle and Sybase tables you need to configure the connection to include the username and password: This may be done in ODBC configuration or on a table by table basis. Security concerns...
  7. M

    Automating Macros

    change your security and workgroup The username / password is because it is trying to log in to your workgroup. Consider allowing all users to log in and run the queries then finding a default security file (system.mdw) Specify the default security file on the command line and it should not...
  8. M

    How to keep header on subsequent pages

    Try forcing a new page after the detail If you tell the page footer to force a new page subsequent pages should line up from the top again. The overflow may not be pretty but the rest should work
  9. M

    Load data from Internet to Access

    tab formatted data? The example data appears to be tab formatted with "," as the decimal separator. Which version of Access are you using? HTML handling improves with later versions, I believe, but I am stuck with Access 97. Are you trying to import a text file or drive a PHP script to...
  10. M

    Insert New Records with Range of Values

    How to recreate my example As sent to Brian Kitka off-line when my attempts to email the database were not successful (my default db security is too good :). Using these notes anyone can re-create the example database and prove looping increments work. They can then add Pats notes above to...
  11. M

    Insert New Records with Range of Values

    Thanks. DAO vs SQL Pat, Thank you for posting the DAO example. I needed to do more than 100 line by line appends last week [for the first time in several years] and the SQL code walked, rather than ran. I will recode using DAO then post a comparison. ... Comparison complete. DAO ran in 14...
  12. M

    Insert New Records with Range of Values

    No. intseal increments The example runs an SQL Insert for each value of intSeal in the range specified. Try it. I know it works. I built an Access '97 database to prove it before posting. If you are really desperate I can email you the database and you can try it. Send me a message with...
  13. M

    Insert New Records with Range of Values

    Try a vba loop ... hopefully close enough :-) Option Compare Database Option Explicit Public Sub AddSealRange() Dim intSeal, intStart, intEnd As Integer Dim strDesc, strSQL As String intSeal = 0 strDesc = "demo for my purposes" intStart = 0 intEnd = 400 For...
  14. M

    Variable Declaration

    Best practice: Limit to minimum scope required Paul, Best programming practice is to declare variables for the mimimum scope required. For readability put all the dim's at the top of the procedure or function and ensure you use option explicit in every module so variables must be defined...
  15. M

    Show User Group

    showing groups This code can show whether a user is in an intended group. It should be possible to convert it to match your requirements. ** Not my code ** .. if anyone knows the original author please post. Function UserInGroup(GroupName) ' Check if the current user is in the chosen...
  16. M

    Show Linked BackEnd

    Use MSysObjects tables in Access '97 Which version of Access are you using? The following query works in Access '97 and lists all attached tables with the database they are linked from. SELECT MSysObjects.ForeignName, MSysObjects.Database, MSysObjects.Name FROM MSysObjects WHERE...
  17. M

    Access 97/Excel 97 OLE problem

    .. OLE still struggling Fuga, I have moved a msgbox to below the end of the code to prove these lines are executing and tracked them step by step in the debugger. The lines are being called but Excel does not close :-(
  18. M

    Access Invisible

    grappling with Visible and Enabled Look for visible and enabled attributes on the form or for some ability to refresh the display.
  19. M

    Access 97/Excel 97 OLE problem

    Objective: To open, read and close an Excel file. The code below works but does not close down the worksheet properly afterwards. The symptoms are: Double-click on the spreadsheet in Explorer and it 'flicks open' then instantly closes again. Double-click on any other spreadsheet in Explorer...
  20. M

    Counting criteria

    Simple Crosstab queries work against an Oracle SQL back-end for me. Some other options: Do a select query against the SQL data and build the crosstab against the select query. Export your data to Excel and use Excels Countif function. Write a report and use count on the report footers.
Back
Top Bottom