Search results

  1. S

    Appending Bits to a String

    you can use Space() to allocate a string of a given number of characters, but i don't know of any way to manipulate strings at the bit level. Space() could help you though if you need to pad out to a byte boundary. myStr = Space(63) 'a string w/ 63 characters what does your function do...
  2. S

    Extremely strange '2001' error

    so it's the second call to your search routine that raises the error? or does the error occur during the call to your clear routine? can you post the entire search routine? have you been able to identify which statement is producing the error? (if not, try stepping through the code or using...
  3. S

    Simple 'Insert Into'

    first, it would probably be a better idea to use a real date field in your table, rather than a text field. also, you can't use straight SQL in the middle of your VB code -- you have to concatenate your SQL together into a string and then send the string as a command to the database. there's...
  4. S

    table locking?

    ReAn, Haha, evidently so! :rolleyes: It kind of surprises me since Litwin/Getz/Gilbert say pretty clearly in the Access 2K Dev. Handbook (which I thought was the authoritative book) that ADO is the preferred method going forward. I haven't worked with versions of Access past 2K... is ADO in...
  5. S

    inform user of additions

    can you change the table design? if so, one approach might be to add a field to the table so that you could date-stamp the records as they were added (you could also stamp edited records if you wanted users to be able to see any new changes). then keep a log of which users logged in when, and...
  6. S

    newb question but bear with me

    make a button on your form and make an event procedure in its On Click property (just click the "..." button next to the On Click field on the properties window). this should take you to the VBE and set you up with the shell of an event procedure. then just call the procedure you've written...
  7. S

    table locking?

    Further testing reveals the same problem whether locking optimistically or pessimistically under ADO. Also, I learned that the CurrentProject.Connection object does not support pessimistic locking -- you have to create a new connection to get pessimistic locking. Even after making this...
  8. S

    Use a set / array of values in function

    vb definitely supports arrays. this link should help: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconarrays.asp
  9. S

    Referencing a date/time field

    Mike is right -- the default approach will only work on a go-forward basis. however, you could write an update query to go through all your old records and make a one-time correction in the table data. after that the default will take care of any new record. that way you wouldn't have to use...
  10. S

    Please help with a conditional statement for query by form method

    well, it sounds like you might have a work-around figured out, but if you still want to figure out your original problem, i agree that it would be helpful if you could post your table structure. were you saying earlier that you are using a string field (not a numeric field) in your table? it...
  11. S

    table locking?

    ReAn, Thanks for your reply. I modified my test app to use DAO and though I haven't tested as thouroughly yet, it seems that you're right -- I don't encounter this problem under DAO. Does anybody have any further insight on this? Any ideas on why I'd encounter this behavior under ADO and not...
  12. S

    Please help with a conditional statement for query by form method

    You can test for null values in Access SQL like this: ... WHERE FieldName IS NULL
  13. S

    Is it posible to implement polymorphic function/Sub in VBA?

    i think your question boils down to can you overload function definitions in VBA and so far as i know the answer is no. but... since you're only using that parameter to build a SQL string, what's wrong with passing the integer value as a string? as your code stands the parameter is implicitly...
  14. S

    Click a button on another form

    have you tried this syntax? Forms("formname").ButtonName_Click That's the collection of currently opened forms. Note that normally event procedures are Private... you'd have to make that button's event procedure Public to call it from another form's module.
  15. S

    Findfirst w/ date field

    in your concatenated string, are you surrounding your date value in # delimiters? like this... #1/1/04# ...?
  16. S

    grabbing table values

    you can find the number of columns like this: NumCols = rst.Fields.Count You can reference a column using its index rather than its name: Val = rst.Fields(0) The indices are 0-based, so that line above will give you the value from the first column. To loop through all columns, then, you can...
  17. S

    table locking?

    Hi everybody, I have built a very small split-DB app to test out the locking behavior of Access 2K under ADO. I have a backend DB that has only a single table. My frontend has one module with a procedure that opens an ADO recordset against the backend table, and attempts an edit to an...
Back
Top Bottom