Search results

  1. W

    Enums as Global Constants

    Cheers guys decided to go with this.. Public Enum EnvironmentStatus DevelopmentEnvironment = 1 TestEnvironment = 2 ProductionEnvironment = 3 End Enum Global Const g_EnvironmentStatus As integer = DevelopmentEnvironment Sub ConnectTables() Dim db As DAO.Database, t As...
  2. W

    Enums as Global Constants

    yeah.. doesnt like it.. Compile error: Expected: end of statement
  3. W

    Enums as Global Constants

    Is there a reason why I cannot create a Global Const of type Enum ? Public Enum EnvironmentStatus DevelopmentEnvironment TestEnvironment ProductionEnvironment End Enum Global Const g_EnvironmentStatus As EnvironmentStatus = DevelopmentEnvironment Sub ConnectTables() Dim db As...
  4. W

    Autonumbers and Upsizing to SQL Server

    Think I have found the problem.. For some reason the field was being upsized with a Default Value of zero. Thanks
  5. W

    Autonumbers and Upsizing to SQL Server

    I've tried, but I cannot change it.. there is no drop down.. and cannot overwrite the value 'NO' This is a database i have upsized on my own desktop to use for initial testing..
  6. W

    Autonumbers and Upsizing to SQL Server

    Yes.. I'm using the SSMA tool..
  7. W

    Autonumbers and Upsizing to SQL Server

    I've got a problem with my top level table. The primary was built as an autonumber and set to Primary Key.. However, when I import to SQL Express, the field goes in as a Primary Key but is not set as the Identity field. Any ideas what is going on here ?
  8. W

    Primary Keys on Autonumbers

    Ok.. so in my example above, two indexes are created.. Index 1..... Index Name: ID Field Name: ID Primary: No Unique: No Ignore Nulls: No Index 2..... Index Name: ID Field Name: ID Primary: Yes Unique: Yes Ignore Nulls: No If I delete the index 'PrimaryKey' and set the following properties...
  9. W

    Primary Keys on Autonumbers

    I've just been looking at how Access creates PK's... I created a new table, and created a field 'ID' of type Autonumber.. I then clicked the PK button on this field and saved the table. Now, when i go to the indexes on the table, there are two.. one is named 'ID' on field 'ID'.. the other is...
  10. W

    Default Values..

    Hi Guys Thanks for all your input.. I'll be capturing date and time.. makes sense to me if there is no compromise on disk space.. and it will be useful.. Hopefully something like this will work.. Although need to add some handling for db's which are protected.. Should work though.. ' Uses...
  11. W

    Default Values..

    I implemented this at table level in the back end data file.. Yeah, i realise that will only work on new records.. If I use DATE() instead of NOW() I presume it will still occupy the same of disk space as the field is datetime? Yeah, I wanted to implement this at table level.. Basically...
  12. W

    Autonumber field order

    one solution is to create another table with the copied structure, then append to that table in the required order..
  13. W

    Default Values..

    Hi Guys I've just realised that i can set the date a record is created using the Default Value property on a table, by setting it to NOW().. Now, I was wondering is it possible to capture the username of who created the record? I've always used this function when writing records to a db...
  14. W

    Deleting and replacing linked tables in MS Access with VBA

    It sounds like you need a list of all the Access tables that are to be replaced by SQL tables, with their equivalent table names in the SQL Server Database that you will connect to.. Build the list in Access.. then iterate thru the table using a recordset.. Build a function to add the SQL...
  15. W

    Bizarre problem when creating bookings on events database

    In summary.. We have a form with Company information. On this form, there is a subform listing all the contacts at the Company.. The Contacts subform is set to allow additions. When adding a new contact, there is a button which allows the user to add a new booking. This opens a new form...
  16. W

    Displaying fields from SQL Stored Procedures in MS ACCESS 2003 fields

    Hi Have now managed to fix this with help from the guys on Stack Overflow.. These were the lines of code that fixed it.. With cn .Provider = "Microsoft.Access.OLEDB.10.0" .Properties("Data Provider").Value = "SQLOLEDB" .Properties("Data Source").Value = "Server"...
  17. W

    Displaying fields from SQL Stored Procedures in MS ACCESS 2003 fields

    Hi All.. I work with Jeff and I've been looking at this.. This code works so far as that I can loop thru the recordset returned from the stored procedure.. However, I still cannot bind it to the form. Private Sub RetrieveSiteInformation() Dim cmd As New ADODB.Command Dim cnn As New...
  18. W

    DSN-Less connection is read only

    Yes it was the primary keys.. a database that I have inherited..
  19. W

    DSN-Less connection is read only

    I have used the VBA script 'AttachDSNLessTable' from the MS website to connect to my db in SQL Server 2000. http://support.microsoft.com/kb/892490 '//Name : AttachDSNLessTable '//Purpose : Create a linked table to SQL Server without using a DSN '//Parameters '//...
  20. W

    Audit of Access Databases

    thanks.. that should help..
Back
Top Bottom