problem changing the forecolour

  • Thread starter andy stanford-jason
  • Start date
A

andy stanford-jason

im trying to modify the forecolour of a single box in a data sheet but it
wont change. i have tried:
quantity.forcolour = rgb(255,0,0)
but nothing happens.
then i added:
me.repaint
and
DoCmd.RepaintObject
but still nothing.
any ideas, thanks
 
S

scubadiver

As far as I am aware I don't think you can with a datasheet. You can make it
a continuous form and change the formatting so it looks like a datasheet.
 
A

andy stanford-jason

thanks thats a really good idea, ive tried doing it but im unsure of the
syntax.

Dim rs0 As New ADODB.Recordset

rs0.Open "SELECT Product.ProductWeight,
ProductOrder.ProductOrderUnitQuantity " & _
"FROM Product INNER JOIN ProductOrder ON Product.[ProductID] =
ProductOrder.[ProductID] " & _
"WHERE ProductOrder.OrderID=91", CurrentProject.Connection,
adOpenStatic, adLockOptimistic

Weight = DSum("[ProductWeight]*[ProductOrderUnitQuantity]", rs0)
rs0.Close

im sure the problem is with rs0 but i dont know how to fix it.
thanks for any help
 
S

scubadiver

I haven't a clue what that syntax is and why need it!

What do you mean by "forecolor" (daft question maybe)



--
www.ae911truth.org



andy stanford-jason said:
thanks thats a really good idea, ive tried doing it but im unsure of the
syntax.

Dim rs0 As New ADODB.Recordset

rs0.Open "SELECT Product.ProductWeight,
ProductOrder.ProductOrderUnitQuantity " & _
"FROM Product INNER JOIN ProductOrder ON Product.[ProductID] =
ProductOrder.[ProductID] " & _
"WHERE ProductOrder.OrderID=91", CurrentProject.Connection,
adOpenStatic, adLockOptimistic

Weight = DSum("[ProductWeight]*[ProductOrderUnitQuantity]", rs0)
rs0.Close

im sure the problem is with rs0 but i dont know how to fix it.
thanks for any help
scubadiver said:
As far as I am aware I don't think you can with a datasheet. You can make it
a continuous form and change the formatting so it looks like a datasheet.
 
B

BruceM

Forecolor is the font color. There may be an exception or two in which it
is something other than font color, but I can't recall offhand. I believe
you are correct about formatting in datasheet view.
Andy, I can't figure out why you provided that code in response to the
suggestion to use Continuous form view. At least, that's the sequence I see
from here. Where is this code run, and what is it intended to do?

scubadiver said:
I haven't a clue what that syntax is and why need it!

What do you mean by "forecolor" (daft question maybe)



--
www.ae911truth.org



andy stanford-jason said:
thanks thats a really good idea, ive tried doing it but im unsure of the
syntax.

Dim rs0 As New ADODB.Recordset

rs0.Open "SELECT Product.ProductWeight,
ProductOrder.ProductOrderUnitQuantity " & _
"FROM Product INNER JOIN ProductOrder ON Product.[ProductID]
=
ProductOrder.[ProductID] " & _
"WHERE ProductOrder.OrderID=91", CurrentProject.Connection,
adOpenStatic, adLockOptimistic

Weight = DSum("[ProductWeight]*[ProductOrderUnitQuantity]", rs0)
rs0.Close

im sure the problem is with rs0 but i dont know how to fix it.
thanks for any help
scubadiver said:
As far as I am aware I don't think you can with a datasheet. You can
make it
a continuous form and change the formatting so it looks like a
datasheet.

--
www.ae911truth.org



:

im trying to modify the forecolour of a single box in a data sheet
but it
wont change. i have tried:
quantity.forcolour = rgb(255,0,0)
but nothing happens.
then i added:
me.repaint
and
DoCmd.RepaintObject
but still nothing.
any ideas, thanks
 
G

Guest

There is an Access menu item to change the font, which
allows you to change the font color, so at worst you could
automate that, but I am almost sure that most of what you
can do through the Access built in menus, you can also
do with DoCmd.

But note that the menu structure changes with major
version changes.

(david)
 
Top