Search results

  1. R

    Append query: data conversion error not triggered by commas

    thanks for the response... you've just made me think - it's probably to do with using commas as 'thousand' separators..
  2. R

    Append query: data conversion error not triggered by commas

    I'm using an append query to copy data from one table to another. I've noticed that values containing commas do not trigger data conversion errors if they are being written into a 'Number' field. For example, if a value such as "23,7" is written into a numbers-only field in the target table, it...
  3. R

    Allen Brown's Error Handling in VBA

    Those "Case 999" and "Case 9999" statements are just to give you examples of how you can tailor Access' behaviour in the event of an error occurring, you don't have to use them. So if you wanted Access to ignore error code '1234' and then continue to execute your code, you would use ####...
  4. R

    VBA code to increment numeric portion of a string

    Unfortunately the separator won't always be hyphen - the input string could be absolutely anything... I'd never heard of the 'split' function though, so that's helpful in itself! Thanks.
  5. R

    Allen Brown's Error Handling in VBA

    The function gets called in the error trapping section of your own sub/function. So (as taken from Allen Browne) you'll have something like this in all your own subs/functions (obviously 'SomeName' would be replaced with the name of your sub or function!): ########## Sub|Function SomeName()...
  6. R

    VBA code to increment numeric portion of a string

    great - thanks for the pointers. In my case the prefix cannot be predefined (Gina - in your link it looks to me like the prefix needs to be predefined in the code?). My code needs to be able to cope with any alphanumeric string that's input and increment the right-most numerical portion if...
  7. R

    VBA code to increment numeric portion of a string

    Hi, I'd really appreciate some feedback on the attached code. The code is intended to take an alphanumeric string and increment the numerical part by a specified amount e.g. the string CV01-00123 would be incremented to CV01-00124 (it's going to be used in a data input form for entering...
  8. R

    Non-primary keys in relationships

    Fair point, Doc Man - although wouldn't setting the relationships to 'cascade updates' prevent any RI issues when/if the PK changed?
  9. R

    Non-primary keys in relationships

    Thanks for taking the time to reply everyone, appreciated...
  10. R

    Non-primary keys in relationships

    Thanks for the replies. The reason for using non-primary keys in the relationships is this... The data is not entered directly into the database, so I can’t rig up data entry forms to enforce data to comply with relationship rules as it is entered. The data is first entered into Excel and...
  11. R

    Non-primary keys in relationships

    I've been wrestling with a design dilemma for a few days and I'd welcome some advice. I know that it is technically possible in Access to set up a relationship in which a foreign key in one table references a non-primary, but unique, indexed field in another table. I have a situation where it...
  12. R

    Round function returns too many decimals in query

    Many thanks for your help, much appreciated. It's certainly made me suspicious of using Single and Double types.
  13. R

    Round function returns too many decimals in query

    Many thanks for pointing me towards that thread; I never knew that about single and double types, I suspect that's the reason nailed... certainly learned something there! Cheers Steve
  14. R

    Round function returns too many decimals in query

    The datatype is Number (field size Single). The decimal places property of the field is 'Auto', but that should be irrelevant, shouldn't it? Thanks
  15. R

    Round function returns too many decimals in query

    I am using the Round function in a query to display a number field in a table to 2 decimal places, but it returns a number with about 10 decimal places. Please could anyone tell me why this is? Example: In a table there is a field called 'Num' which is of number type 'Single'. A value in this...
Top Bottom