Search results

  1. R

    How do I make a report with counts of more than one field?

    Where you need the count (group footer(s)/report footer?), add one text control per count you need. Then create the following controlsource (here I'm playing with the field "Employee City" and Minneapolis) =ABS(Sum([Employee City] = "Minneapolis"))
  2. R

    Access behavior with SQL Backend

    With reference to another thread - there must be a way to identify each record, which means that each table must have a primary key or unique index (but then, one might argue whether a table without a primary key or unique index is indeed a table?)
  3. R

    "Key column information is insufficient..." error even with a PK

    If you can't alter the trigger, and the code thingie doesn't work, then I don't know, I'm afraid. Here's a thread from one of MS public newsgroups, with a bit of information, thoughts, links and discussions, which also includes some perspectives outside Access/SQL (ADP)...
  4. R

    avoid MS Access message

    Execute on the database object in stead (or if you favour ADO, execute on the connection) CurrentDB.Execute SQL, dbFailOnError BTW - for regular concatenation, the ampersand (&) is the operator to use, not +.
  5. R

    Assign Two Primary Keys

    doco, if your instructor said that, I think you should request a qualified instructor. If you search on topic, I think you'll find that even most surrogate key fans will agree that composite primary keys are quite OK under some circumstances. See for instance...
  6. R

    How to delay the processing for seconds

    As boblarson says, if we know what you wish to do, it's easier to assist. One approach, might be using the Sleep API, see for instance http://www.access-programmers.co.uk/forums/showthread.php?t=78482
  7. R

    Start an Application from a Form

    I've never used the datatype you mention, I would store the document path in text fields, then use the ShellExecute API to execute it. That sounds terribly hard, but really isn't. Dev Ashish has made a terrific wrapper function for it http://www.mvps.org/access/api/api0018.htm which you just...
  8. R

    Word automation - runtime error type mismatch

    Just a comment on the New/CreateObject - MS often recommends CreateObject when automating, also when doing early binding. Check out the explanations after the third code segment here http://support.microsoft.com/?kbid=244264 I think mayhaps the rest of the article might be interesting to the...
  9. R

    "Key column information is insufficient..." error even with a PK

    Disclaimer, I'm on a guessing tour here. I don't use ADPs much, not many do, I think due to MS lack of enthusiasm for it ;) Since you have a PK, and I assume it is in the recordsource, I'm guessing that you have a trigger. If so, there are two tricks you can do, one, is to set NOCOUNT ON in the...
  10. R

    How do I refer to Word's bookmarks for multiple pages?

    Sorry, I thought you were after index. TheDoc.FormFields("MyFormField").Result = "MyText" should work, shouldn't it? Though there's no validation. Below is a small snippet ensuring the actual list entry is there, prior to selecting. dim dd as dropdown dim l as long set dd =...
  11. R

    How do I refer to Word's bookmarks for multiple pages?

    For instance to set the second list entry TheDoc.FormFields("MyFormField").DropDown.Value = 2
  12. R

    A Problem with .index property with a linked table

    I don't know, but I think I'd try opening a recordset based on an sql string with an ORDER BY clause, or test whether usage of the the recordsets .Sort property suits. There's seldom any good reasons for opening a whole table anyway, using a WHERE clause to restrict the actual returned records...
  13. R

    Absolutely stuck Insert string to table with sql

    You want each row in the string into a new record? I'm not sure I understand the why, but that'll be my problem (untested code)dim s() as string dim l as long s=split(ver1, vbCrLf) for l = 0 to ubound(s) db.execute "INSERT INTO QDN_Tidy (field1) Values (""" & s(l)...
  14. R

    A Problem with .index property with a linked table

    What you're probably doing, is preparing to use the .Seek method, right? This isn't available on ODBC linked tables, I think. I suggest to rewrite using the recordset find methods (.FindFirst ...).
  15. R

    How do I refer to Word's bookmarks for multiple pages?

    I have an app/process where I use a Word template that under some circumstances might change. My approach is to make a (local) copy of the template, which I use (and kill afterwards). Then there's no real damage to the "real template". But usually, you should not intentionally change anything in...
  16. R

    Updating the Back End structure in VBA

    Yes, there are other ways of testing, one could for instance use the OpenSchema method of an ADO connection, saydim rs as adodb.recordset set rs = TheConn.OpenSchema(adSchemaColumns, _ Array(Empty, Empty, "TheTable", "TheColumn")) if rs.eof then ' doesn't exist...
  17. R

    Absolutely stuck Insert string to table with sql

    What is the datatype of field1? An Access text field takes max 255 characters. For more, you'd need memo. What is the result of what you're doing, how do you determine something is wrong? Is there an errormessage? What is the result if you do a Debug.Print ver1 Prior to adding it to the...
  18. R

    Updating the Back End structure in VBA

    A "brute force" version, could be to just try adding it, if it already exists, it will throw an exception that you can handle/disregard. Say (non tested, probably need some errortesting also for the Else part)Set td = db.TableDefs("tblxx_Eigenschaften") With td on error resume next...
  19. R

    How do I refer to Word's bookmarks for multiple pages?

    MailMerge - for new pages with identical formatting, one idea could be to play with Headers and/or footers for the information on each page, then use catalog setup for the repeating information. A catalog setups doesn't necessarily mean there's one line/paragraph per "record", you can have...
  20. R

    Programatically set Reference

    As I said, you must replace the constants with the number it represents, i e in stead of WordObj.Selection.GoTo what:=wdGoToBookmark, ... use WordObj.Selection.GoTo what:=-1, ... and wdLine with 5 further down. There might be other issues, too, but try that first.
Back
Top Bottom