Search results

  1. R

    ADO find function problem

    The message means that it doesn't find a record (which you don't check for - always check for .Eof after .Find), so it continues to try to edit a record while on .Eof or .Bof, which creates this error. In the initial code, you are looking for a text starting with a space. Is that correct? i e...
  2. R

    rst.CursorLocation = adUseClient

    I'm the wrong person to ask, as I'm one of the very few who do use ADO also for Jet tables, except when I manipulate a "native" form recordset (which is DAO, unless you work wiht ADPs or set it explicitly). But here's one reason - since most developers use DAO for Jet tables, you're more likely...
  3. R

    Word Automation

    According to the intellisence and the help file, the third arguement of the Documents.Open method is the ReadOnly arguement/parameter, so Set objDoc = objWord.Documents.Open(CStr(RLlink),,true) should probably do
  4. R

    rst.CursorLocation = adUseClient

    Usually, when ADO cannot determine the recordcount, it returns -1, not 0. Client side cursor comes at a cost. Check out for instance http://www.adopenstatic.com/experiments/clientsidecursortypes.asp, http://msdn2.microsoft.com/en-us/library/ms676564.aspx and...
  5. R

    Amending code for Browsing a Folder

    You are welcome! If I recall correct, it should work OK, unless you have some "ancient" OS (I'm thinking Win95/98?), where it will probably give "c:\" or "My Computer" regardless of chosen folder.
  6. R

    Amending code for Browsing a Folder

    According to the terms of usage of TheAccessWeb, one should rather post a link than copy/paste code. If that had been done with the original reply, then you would probably have found the answer by looking at the link to the original code (http://www.mvps.org/access/api/api0002.htm), and find the...
  7. R

    Error 91: Object variable or With block variable not set

    I wasn't aware you could do stuff like that with DAO, but with ADO, it should be quite easy. You need to establish a connection to the db - see for instance http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForSQLServer, then dim rs as adodb.recordset dim cn...
  8. R

    Writeline to textfile?

    The Write or WriteLine method of the textstreamobject should do that. What is causing the challenge here, is probably that you aren't opening an existing textfile, you are creating a new one. Try something like the following if fs.fileexists("c:\testfile.txt") then Set vtextfile =...
  9. R

    Predefined Color Variables

    I think I'd use Enum or Constant - or was it a point that one should be able to change the value of those public variables? Also, since vbBlack, vbRed, vbGreen, vbYellow, vbBlue, vbMagenta, vbCyan, vbWhite already exist I'm not sure I see the point in "redefining them" ;)
  10. R

    Primary Key

    Thank you!
  11. R

    Cascade-To-Null Foreign Key

    From your description of your relationship, I think you are using Cascade-To-Null as it is intended.
  12. R

    Type mismatch inconsistency bet. forms

    I think your type mismatch stems from using bang (!) when referring to a property. Try ONumID = Combo48.Column(0) in stead (.) I've never used applyfilter, but assuming it does work, I think you should concatenate the value into the string you pass to it, not the variable name...
  13. R

    why 2 keys in one table?

    Here's a not so very long article covering some of this http://r937.com/relational.html
  14. R

    why 2 keys in one table?

    You are right that one table can only have one primary key - but the primary key may consist of more than one field. That is what you see, one primary key consisting of the CustomerID field and the TransactionData field. Meaning you can have duplicate customers and duplicate transaction data...
  15. R

    Access 2007 cannot open Word 2003 docs

    You are welcome! I think the VB(A) Shell function, is just another wrapper for the ShellExecute API. With the former, you'll need full path/name of the app, in addition to path/name of the file you wish to open. With ShellExecute, you only need the path and name of the file you wish to open. I...
  16. R

    Access 2007 cannot open Word 2003 docs

    You could try the ShellExecute API in stead of Shell. This will open the file in the program it is associated with (Edit: without needing to specify full path) - check out the wrapper here http://www.mvps.org/access/api/api0018.htm
  17. R

    Primary Key

    I have tried, several times (though it is a while ago), and I did consider my previous reply as the report you're asking for. I think I gave all relevant information there, but let me repeat them, and try to be a bit more precise. If you don't have a single unique field in the rowsource, then...
  18. R

    Access 2007 cannot open Word 2003 docs

    Being so secretive with code, it's hard to say, but I can successfully open a 97/2003 format file from Access 2007 through Shell with both Word 2003 and 2007. Same with Excel. Just by changing the path to Office directory (using correct path). I have no chance testing late binding from Access...
  19. R

    Access 2007 cannot open Word 2003 docs

    I don't understand what you mean by "trying to open Word 2003 and Excel 2003 documents". Do you mean automation, followhyperlink, shell, ShellExecute or something else? If you could give us the code or method failing for you, what actually happens..., I think it's a bit easier to assist. Edit...
  20. R

    How to add a column to a linked table?

    Storing a value that can be derived (calculated) from other columns in the same row, is considered a no-no ;) If that's what you're doing, then rather calculate in the query. Else, perhaps explain again, and show some (smallish) sample data demonstrating what you wish to do? If you actually...
Back
Top Bottom