fields join

  • Thread starter Thread starter golan
  • Start date Start date
G

golan

hello;i have 2 comobox month and year. i want to join the to one field after
the user choose.
 
thanks , if i want to to define variable as date in format mm yy how i can do
it?
thanks again
 
Why join them at all? If you have two fields, YearField and MonthField say
you can always join them in an expression in a query or in code, or in the
ControlSource of a computed control in a form or report. The combo boxes can
then simply be bound to the fields. Having them as separate fields will make
things easier in many ways.

BTW Steve's SetFucus method is one of his own invention, the purpose of
which I would prefer not to contemplate! He meant SetFocus.

Ken Sheridan
Stafford, England
 
Provided the YearField value is a four digit one you can use:

=Format(YearField & "-" & MonthField, "mm yy")

Omitting a day of the month assumes the first of the month, but bear in mind
that this returns not a value of date/time data type, but a string
expression. In fact you can't have a date/time value of limited precision.
Even without any time of day being entered this assumes a time of day of
zero, i.e. midnight at the start of the day. You can see this yourself if
you use:

=Format(YearField & "-" & MonthField, "yyyy-mm-dd hh:nn:ss")

Ken Sheridan
Stafford, England
 
Steve said:
<BTW Steve's SetFucus method is one of his own invention ............ >

I plagarized this line of code from John Marshall, MVP Visio :)

Steve

You still like to lie. I'm still waiting for an apology for the libelous
accusations you made the other day.

At least you freely admit to the fact that you do plagarize. So before you
forget, these newwsgroups are provided by Microsoft for FREE peer to peer
support.

John...
 

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

Similar Threads

Requery 2
new record 2
update listbox 2
Multiple left joins 3
Nested query problem 6
How to build a "reach around" query? 5
open form with no data 11
Hyperlink 1

Back
Top