Search results

  1. S

    Changing all ZLS in a table to Null

    Just a note that testing and integration to the live DB was completed problem-free. I didn't add code to exclude any fields since in my specific application it is not required (indeed, if the PKey has a ZLS in the data there is a different problem entirely!). Some new knowledge: "fld.Type =...
  2. S

    VBA functions for easier use of simple Progress Bar and Status Bar

    Hi all, I recently wanted to implement use of the status bar and/or progress bar (bottom left and bottom right in Access window respectively) in some VBA code to give the end user some info about what is happening behind the hourglass. I found how to do it online somewhere (sorry can't remember...
  3. S

    VBA functions for easier use of Progress Bar and Status Bar

    Both of your points were useful, thanks!
  4. S

    VBA functions for easier use of Progress Bar and Status Bar

    Hi all, I recently wanted to implement use of the status bar and/or progress bar (bottom left and bottom right in Access window respectively) in some VBA code to give the end user some info about what is happening behind the hourglass. I found how to do it online somewhere (sorry can't remember...
  5. S

    Changing all ZLS in a table to Null

    Thanks ridders, very helpful. From your post and some experimentation I have built the following code: Option Explicit Public Function ZLStoNull(strTableName As String) 'Runs the ZLStoNull SQL on all text fields in a table Dim db As Database Dim tdf As DAO.TableDef...
  6. S

    Changing all ZLS in a table to Null

    Hi ridders, That is exactly what I described in my original post. My question is the method in which to run an update query on all fields. I feel like nobody has actually read my original post, lol :p
  7. S

    Changing all ZLS in a table to Null

    Hi JANR, This is already done and is the reason the records are not imported. You have posted the same webpage as was linked in my original post :)
  8. S

    how to calculate exact age in access....

    Since you are assuming every month is 30 days and are ignoring leap years, I'm going to assume you're not looking for an exact age and will not open that can of worms. I can however see two problems with your code. 1. Your variables are set to Date type, whereas you are calculating using...
  9. S

    Changing all ZLS in a table to Null

    Hello, I have an auto-generated report in .xls format that I import daily into my 2010 database. In some rare circumstances there is data missing from fields (empty cells) which, when imported, are Zero Length Strings in Access. I have everything in my database set to disallow ZLS since I use...
  10. S

    Adding Date to Append Query

    I agree, you should have two select queries selecting from one main table instead of two tables. i.e. Query1 selects all current members of the mailing list (LeaveDate Is Null) Query2 selects all ex-members of the mailing list (LeaveDate Is Not Null) Otherwise you will have to append the...
  11. S

    Application.Run method not working as intended, Run-time error 2517

    P.S. This concludes my week of asking stupid questions :banghead:
  12. S

    Application.Run method not working as intended, Run-time error 2517

    Okay so it turns out it was me not using Application.Run properly. Firstly since in other places I was using a variable as the function name, I didn't enclose it in quotes for this test, which didn't help at all. But the main reason this failed to work was the incorrect syntax I was using. I...
  13. S

    Application.Run method not working as intended, Run-time error 2517

    Hi all, I am trying to call a procedure with paramters from within another procedure in Access 2010. I've used this method before but for some reason it's throwing a strange error this time. For testing I have created a new normal module, Module 1, and put in the following code: Option...
  14. S

    Remove and set composite primary keys with VBA (maybe)

    Duh! I even have the capability for that already built-in to my import code. This is why I ask these questions, to weed out the stupid in me. Thanks ;)
  15. S

    Remove and set composite primary keys with VBA (maybe)

    That would be ideal of course, however the input file is an Excel file that cannot be edited. Unless there is a way to add an extra field using Access somewhere in the import procudure? I am using a big chunk of code that I use for all my other imports but copying it to a new function for just...
  16. S

    Remove and set composite primary keys with VBA (maybe)

    Hi, Background: I have created a table that is going to hold daily stock snapshots used for reporting. The data is 'in flow' and so there are constant incoming and outgoing items from stock, and constant status changes of those stock items for different stages within the process. e.g. Today's...
  17. S

    Categorise records based on two fields (text and between two values)

    Thanks plog; I knew it would be something like that I was just having an empty brain moment (Friday afternoon effect). It works, of course :)
  18. S

    Categorise records based on two fields (text and between two values)

    Hi all, I am looking to categorise the records in my database based on two fields, say [Rec_Type] and [Rec_Age]. I have my categories in a table like this: [Rec_Type] [Age_Min] [Age_Max] [Cat_Desc] TypeFoo 0 12 TypeFoo 0-12 months TypeFoo 13 24 TypeFoo 13-24 months TypeMan 0 4 TypeMan...
  19. S

    How to check if a property is invalid?

    I believe you are right Dave, I think I will go with trapping the error number with the error handler and do it that way.
  20. S

    How to check if a property is invalid?

    Ah, I've just realised I've made an embarrassing mistake. This is all in Excel, I thought I was in the Excel forums! Sorry! I do not mind if this thread is closed/deleted as it's in completely the wrong category. Oops.
Back
Top Bottom