Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DatasheetCellsEffect - causing great pain!

Status
Not open for further replies.

ShaneBrennan

Programmer
May 19, 1999
198
GB
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

 
should'nt this be a long as well
SetTableProperty tdf, "DatasheetCellsEffect", [red]dbInteger[/color], 2

SetTableProperty tdf, "DatasheetCellsEffect", [red]dbLong[/color], 2

Or not


DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Tried both dbLong and dbInteger - both seem to have no effect!

From the Main Window, I select the Table tab and double click on tblEditableCourseUnitCrossTab. I get the datasheet view, with grey background and white grid lines. but no Sunken effect.

Boo Hoo Access does not like me :(

Shane
Shane Brennan
Shane.Brennan@tcat.ac.uk

 
I feel SUCH a prat!

I was trying to view the table straight from the table tab, i.e. double clicking on tblEditableCourseUnitCrossTab.

When I created a form using the table - I had no problems - DERRRRR! :)

Thanks Doug.

Shane (in desperate need of some asprin) Brennan
Shane Brennan
Shane.Brennan@tcat.ac.uk

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top