International Issue

V

VKY

Dear Friends,

I have a program in Visio which gets data from an access database. One
of the field is a Yes/No field which is boolean (e.g True). This field
is retrived without any problems and displayed on a dialog box with a
check box. Then the same value is written into a shape's custom
properties, under the "value" cell.

All of this work without problems on a English (1033) OS and Visio. When
a German user use the same program, the field from the database is
retrieved as "wahr" and not "True". The assignment of "wahr" to the
checkbox also goes without problems (vba is able to understand "wahr")
but when put in a shape's custom properties' "value" cell, Visio refuses
to coorperate and needs either a True or a False.

Assigning a text value (and not a boolean) to the custom property does
not help as a spanish user will have True=XXXX. Therefore decoding
"wahr" and "XXXX" into english is not much help.

How can I best solve this problem? Your input will be much appreciated,
thanks in advance.

VKY
 
C

Chris Roth [ Visio MVP ]

When you retrieve data from the database, you are using some sort of
database interface library (sorry, I don't speak 'database' very well), such
as ADO or DAO.

These DB interfaces should have some sort of way of testing the value of
boolean fields. I'll give a rough pseudo-code example, since I can't
remember the correct syntax off the top of my head:

If you get field.Value, you might get Si or Ja or Nyet or Falsch. This
doesn't help much. You need something like

If field.Value = DAO.BoolTrue Then... or something similarly arcane.

The shape code would be something like this:

Dim dResult as Double ' initially 0, which is FALSE
If field.Value = DAO.BoolTrue Then dResult = 1 '1 = TRUE
shp.Cells("Prop.WhatsTheDeal").ResultIU = dResult



--

Hope this helps,

Chris Roth
Visio MVP
 
V

VKY

Thanks for the reply Chris, it is pointing in the right direction,let me
try it out and reply.

VKY
 
V

VKY

Chris,

Thanks for the pointers. Retrieval of the field from the database yields
si or ja or nyet or falsch. No problem. VBA understand these
languages. The problem is that Visio does not understand these languages
in it's shapesheet cell. I have implemented the below when storing
information into the cell:

shp.cells("Prop.Whatever.Value").Formula = CInt(field.Value)

and when retrieving information:

Field.Value = CBool(shp.Cells("Prop.Whatever.Value").Formula)

This seems to do the trick but needed extensive testing.

Thanks again.

VKY
 

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