Search results

  1. PearlGI

    Help in Transfering Data from Access Form to Excel.

    As a starter, the following code will define an Excel object. The objExcel object will then enable you to use and control Excel using VBA. Public objExcel As Excel.Application 'If Excel is already open Err.Number returns zero otherwise 'a new Excel session is created Sub OpenExcel() On Error...
  2. PearlGI

    Generating a rank of data on a table via form.

    Data1 and Data2 would be the names of your textbox fields. FieldName is the 'column' in your table. If the column name contains a space then ensure that you put square brackets [] around the name. Regarding the action, I suggest that you put the code into the 'On Click' event of the button.
  3. PearlGI

    On GotFocus issue

    Thanks David Does that then mean that the On GotFocus event of the form itself can never be triggered? A redundant event......
  4. PearlGI

    On GotFocus issue

    Experiencing problems with the On GotFocus event. I have a form with an event procedure assigned to the On GotFocus event of the form itself. However, when the form receives focus (after returning from another form) the event is not triggered! Any ideas?
  5. PearlGI

    Generating a rank of data on a table via form.

    What you need is something like this: (I've assumed the code will be attached to the form) Set db=CurrentDB set rs=db.OpenRecordset("TABLENAME") For x = Val(Right(me!Data1,3)) To Val(Right(me!Data2,3)) rs.AddNew rs!FieldName=left(Me!Data1,1) & String(4-Len(x),"0") & x rs.Update Next...
  6. PearlGI

    Generating a rank of data on a table via form.

    Is your data always going to be in the format Alpha,Numeric,Numeric,Numeric? If not, could you elaborate further on what the data field limits are? For instance, is the data always prefixed by a Alpha or Alphas and then followed by numerics, etc, etc
  7. PearlGI

    read/write in VBA

    Hi I have a solution that works for the example given. Step 1: Create the following query and call it 'qryWoAlloc' SELECT tblWorkOrderAlloc.strWONum, Sum(tblWorkOrderAlloc.lngAlloc) AS Alloc FROM tblWorkOrderAlloc GROUP BY tblWorkOrderAlloc.strWONum; Step 2: Create the following module and...
  8. PearlGI

    CREATE TABLE with 'Required' set

    Of course :o Many thanks, had not made the connection between NOT NULL and Required :rolleyes:
  9. PearlGI

    CREATE TABLE with 'Required' set

    Why? Because this is part of a user interface which needs to create a temporary table to validate and error handle data import files containing potentially unknown fields. It wouldn't be much of a user interface if the user had to manually use the Access table interface to create a table that...
  10. PearlGI

    CREATE TABLE with 'Required' set

    Hi I've created the coding required to create a new table, but I also need to set the 'Required' parameter to 'Yes' on some selected fields. Is is possible to do this whilst creating the table with the 'CREATE TABLE...' statement or is there another way of programatically setting the...
  11. PearlGI

    Array Formulae

    Ah, I've found the solution. :) Whilst trawling through the posts on SUMPRODUCT I found a link to this site http://xldynamic.com/source/xld.SUMPRODUCT.html (suggested by qafself) Very interesting reading, I didn't realise how versatile the SUMPRODUCT was!:cool: Anyway, this inadvertently...
  12. PearlGI

    Array Formulae

    The SUMPRODUCT examples that I've seen seem to deal only which the boolean 'AND' logic with multiple arrays. What I need is the boolean 'OR' within a single array. SUMPRODUCT also needs the arrays to be the same size.
  13. PearlGI

    Array Formulae

    Hi, I've been using array formulae (formulae entered with [Ctrl]+[Shift]+[Enter]) for many years now, but can not work out how to get them to work (in just one formulae) if the value you wish to compare the array to is not a single value. For instance, if I wish to sum the value of 'Dog' from...
  14. PearlGI

    Cache problem on web-based Excel file

    Hope this is the right forum - seems to be a web problem rather than an Excel problem. I have an Excel file (file A) that links to data from another Excel file (file B) contained on a web-server. The data in file B is updated weekly and usually I have no problem with updating the linked data...
  15. PearlGI

    QueryDef Type=3?

    Does anyone know what a QueryDef Type of 3 is? If I run the following code, as well as returning all queries in the db, it also returns a few that are of Type=3. For Each qd In db.QueryDefs Debug.Print qd.Name & " - " & qd.Type Next For the Type 3 ones, the qd.Name returns something like...
  16. PearlGI

    Open an Existing or New Excel Workbook

    see this post if you want to know how to extract just the folder name rather than with the filename as well. http://www.access-programmers.co.uk/forums/showthread.php?t=60268&
  17. PearlGI

    Open an Existing or New Excel Workbook

    CurrentDB.Name
  18. PearlGI

    Open an Existing or New Excel Workbook

    The following code should do what you're asking. Replace the FileLocation and ExcelFileName variables in this code with the references to your form controls. You also need to ensure you reference the Microsoft Excel Object Library. To do this go into any module, select Tools, References and...
  19. PearlGI

    Create a read-only link to SQL db

    I've got an Access frontend that I need to connect through to a SQL db (using SQL authentication). However, I wish to make these links read-only to prevent accidential changes to the data. I can't seem to find a way to do this using the normal link table option and can only assume it has to be...
  20. PearlGI

    Running Access97 with Office2000

    Can anyone provide a comprehensive list of problems associated with running Access97 alongside the rest of an Office2000 installation (note, Access2000 has not been installed). I've heard (from numerous sources) that running this configuration can cause normally working Access97 databases to...
Back
Top Bottom