Error 2101

J

JamesJ

I'm calling the following function from On Current of my
Access 2007 sp2 Split Forms seeing that changing these datasheet
properties in Access Options only is valid for new datasheets:

Public Function DataSheetProperties(frm As Form)

frm.DatasheetFontName = "Calibri"
frm.DatasheetFontHeight = "10"
frm.DatasheetFontWeight = "500"
frm.DatasheetForeColor = RGB(0, 0, 0)

frm.DatasheetBackColor = RGB(255, 255, 255)
frm.DatasheetAlternateBackColor = RGB(121, 167, 227)

End Function

And I'm getting the following error on
frm.DatasheetForeColor = RGB(0, 0, 0):

Error 2101

'The setting you entered isn't valid for this property'

This code is working ok in another backup db from a while back where I
abandoned the split forms for continuous forms.
Only difference is in the one that works ok the datasheet is on the bottom.
The one where it isn't working the datasheet is on the left.
Originally I was changing my forms from continuous to split and placing the
datasheet on the left. The code wasn't
in the current db so I copied and pasted it.from the one that works. I
immediately started getting the error.on the first 4 forms I had changed. I
then abandoned that db and started simply changing the datasheet from the
bottom to
the left on the one that works. Now I'm only getting the error on 1 form
that wasn't in the split form db but as soon
I started calling the function I started getting the error.
The error occurs in the On Load also.

Placing 'On Error Resume' suppresses the error and the form opens ok. But, I
don't care for the idea that something doesn't seem right.

I hope I explained it properly. I don't understand what I wrote myself.

Any help will be appreciated,
James
 
A

AccessVandal via AccessMonster.com

All I can say that the splitform datasheet property is not accessible or
allow changes from code. I would love to see or hear from somebody can show
the code samples.

Got no Help from Help.
 
J

JamesJ

These splitform datasheet properties are available.
I call the function form the On Load now and and able to change font names,
backcolor, alternate backsolor.....
Isn't the code I pasted into my post code example? Although very crude.
And now by putting in the On Error Resume Next the error doesn't trigger.

James
 
A

AccessVandal via AccessMonster.com

That’s the problem with 2007. Sometimes it works and in certain cases it
doesn’t work. Weird part of 2007.

Not all properties are available. Some requires the form to be in design mode
and that’s where the coding gets more complicated.

I wish it were simpler.
 
J

JamesJ

The only reason I 'saw' these properties at all was the 'Auto List' members
popping up.

James
 
A

AccessVandal via AccessMonster.com

Sure it does, that's the form's properties but does it include the SplitForm
properties?

What I'm looking for is the proof of concept like sample codes from MS or
Help.

If the code supposed work, what might be the cause? You could do a code
compile and do a Compact and Repair. See if is an Acccess problem or a
corruption.
The only reason I 'saw' these properties at all was the 'Auto List' members
popping up.

James
That’s the problem with 2007. Sometimes it works and in certain cases it
doesn’t work. Weird part of 2007.
[quoted text clipped - 13 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top