ShaneBrennan
Programmer
Hi there. Here is a little problem that is giving me a little headache - to say the least.
I'm really trying to be a little flash - but hey that's how we all learn to program, or is that just me? Anyways to the problem.
I've created a table, through VBA called tblEditableCourseUnitCrossTab. Now I want to change the appearance of this table in Datasheet view. Using the cell option from the format menu I can access the "Cell Effect" style Sunken - fine - no problem - but this table, is created via VB code, therefore I need to add the code to change these setting through VB.
I've created a TableDef for the table and I CAN set the table properties "DatasheetBackColor" and "DatasheetGridlinesColor" no problem using the following code:
Dim tdf As TableDef
Set dbs = CurrentDb
Set tdf = dbs!tblEditableCourseUnitCrossTab
SetTableProperty tdf, "DatasheetBackColor", dbLong, 12632256 ' Light Grey
SetTableProperty tdf, "DatasheetGridlinesColor", dbLong, 16777215 ' White
And they work fine. However is I add the following line to change the Cell Effect to Sunken it does not work:
SetTableProperty tdf, "DatasheetCellsEffect", dbInteger, 2
Anyone got any ideas?
Shane (Starting to get used to the Headache now) Brennan
Shane Brennan
Shane.Brennan@tcat.ac.uk
I'm really trying to be a little flash - but hey that's how we all learn to program, or is that just me? Anyways to the problem.
I've created a table, through VBA called tblEditableCourseUnitCrossTab. Now I want to change the appearance of this table in Datasheet view. Using the cell option from the format menu I can access the "Cell Effect" style Sunken - fine - no problem - but this table, is created via VB code, therefore I need to add the code to change these setting through VB.
I've created a TableDef for the table and I CAN set the table properties "DatasheetBackColor" and "DatasheetGridlinesColor" no problem using the following code:
Dim tdf As TableDef
Set dbs = CurrentDb
Set tdf = dbs!tblEditableCourseUnitCrossTab
SetTableProperty tdf, "DatasheetBackColor", dbLong, 12632256 ' Light Grey
SetTableProperty tdf, "DatasheetGridlinesColor", dbLong, 16777215 ' White
And they work fine. However is I add the following line to change the Cell Effect to Sunken it does not work:
SetTableProperty tdf, "DatasheetCellsEffect", dbInteger, 2
Anyone got any ideas?
Shane (Starting to get used to the Headache now) Brennan
Shane Brennan
Shane.Brennan@tcat.ac.uk