Re: Formatting Date fields

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



There are a few ways you could approach this, depending on how simple the
conversion algorithm is.

First, I would want to be sure that using a Hebrew-language enabled version
of Word would not let you do it. If it can, that might be your best bet.

You may be able to do the calculation in the data source (might be possible
if for example you are using a server such as SQl Server or Oracle, or can
use an Access Query. In the latter case, the algorithm either needs to be
expressible in a single VBA function that you can put in a query, or you
need to write a function in Access VBA module, reference it in an Access
query, and use the DDE connection method to open the data source).

If the algorithm requires no looping you might be able to do it just using
field calculations. macropod's Word document at

http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902

has pointers on how to do that although I don't think it currently has code
to do exactly what you need.

Again, if the algorithm can be expressed in a single, reasonably short, VBA
expression, you might be able to use a DATABASE field in Word to do the
calculation. If you search google groups for recent messages in this group
with Peter Jamieson DATABASE, you will probably find an article on how to do
that.

Otherwise, you would need either to merge to an output document and
postprocess all the dates using VBA (in which case you need some way to
locate the dates, e.g. using "placehoder" characters, or you need to use VBA
MailMerge events to do the calculation for each data source record.

Peter Jamieson

Otherwise, you will
"Greg" <gml_nospam_@xxxxxxxxxxxxxxxxx> wrote in message
news:EXC4e.60405$Ms3.46142@xxxxxxxxxxxxxxxxxxxxxxx
> Is there any way to use VBA to format date fields, bypassing the "\@" word
> switch.
>
> What I want to do is develop a date format that will take a standard date
> and convert it to its hebrew calander equivalent while merging a document.
>
> --
> Gregory M. La Due
> Twin Tiers Technologies, Inc.
> Senior Programmer
> gml@xxxxxxxxxxxxxxxxx
> (800) 480-6467
>
>


.



Relevant Pages

  • Re: Form Information to Report
    ... Yeh i am familiar with vba code but its been a while since a done some major ... after that how to reference the function to report and form. ... If you have a calculation that is too complex to perform in a query, ...
    (microsoft.public.access.reports)
  • Re: Error Message Access Query
    ... You may need to use an IIf statement in the ... > This won't work in VBA, because VBA evaluates both parts of the IIf whether ... > it needs to or not, but in the query, only the true or false part is ... >> I am busy with a calculation in a query in access and the ...
    (microsoft.public.access.gettingstarted)
  • Re: General Opinion on a how to?
    ... So different prize ... not have to change the database as you add new algorithm to the system. ... The way i see my calculation working with the aid of Jameys tips is this: ... Load into a prize pool object instance for that game ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Kresss Probability Trilogy Qs
    ... We know our mathematics is true by direct insight, ... Any calculation has an experimental aspect to it (albeit one that is ... objections and answers which I'm ... Our "algorithm" is an ...
    (rec.arts.sf.science)
  • Re: Random number generation
    ... The algorithm used by the worksheet RANDdepends on your Excel version ... It also appears that RNGs in the worksheet, Analysis ToolPak, and VBA ...
    (microsoft.public.excel.programming)