Month

  • Thread starter Thread starter SeRene
  • Start date Start date
S

SeRene

Hi,

I need to solve three problems.
One, how can i show the current month based on my system
date on a textbox?? I need to show only the month.

Two, based on the system date, how do i show the previous
month on another textbox?

So i have two textboxes, one is to show the current month
and the other one shows the previous month.

Three, how can i get the value from a textbox in another
form??

Please help me on these 3!!!
Thanks in advance!
 
SeRene said:
Hi,

I need to solve three problems.
One, how can i show the current month based on my system
date on a textbox?? I need to show only the month.

Two, based on the system date, how do i show the previous
month on another textbox?

So i have two textboxes, one is to show the current month
and the other one shows the previous month.

Three, how can i get the value from a textbox in another
form??

Please help me on these 3!!!
Thanks in advance!

It's generally not a good idea to ask multiple questions in a single
post. Your first two questions are closely enough related that it makes
some sense to ask them together, but the third is completely unrelated
and really should have been posted separately.
One, how can i show the current month based on my system
date on a textbox?? I need to show only the month.

Set the ControlSource of the text box to

=Format(Date(),"mmmm")
Two, based on the system date, how do i show the previous
month on another textbox?


Set the ControlSource of the text box to

=Format(DateSerial(Year(Date()),Month(Date()),0),"mmmm")
Three, how can i get the value from a textbox in another
form??

It's not clear to me what you want here. Just to mirror what is shown
on another open form, you can use a text box with a ControlSource
property similar to this:

=[Forms]![OtherFormName]![OtherTextBoxName]

(substituting the appropriate names). However, this would be of limited
usefulness, so I kind of doubt it's what you had in mind. You'll have
to explain in more detail for a better answer.
 
Hi,

I need to solve three problems.
One, how can i show the current month based on my system
date on a textbox?? I need to show only the month.

Put a textbox on the Form with a Control Source of

=Format(Date(), "mmmm")

to show "March".
Two, based on the system date, how do i show the previous
month on another textbox?

=Format(DateAdd("m", -1, Date()), "mmmm")
So i have two textboxes, one is to show the current month
and the other one shows the previous month.

Three, how can i get the value from a textbox in another
form??

=Forms!OtherForm!TextboxName

The OtherForm must be open at the time, and this will get the value of
whichever record is currently selected on the form.
 
Put a textbox on the Form with a Control Source of

=Format(Date(), "mmmm")

to show "March".


=Format(DateAdd("m", -1, Date()), "mmmm")


=Forms!OtherForm!TextboxName

The OtherForm must be open at the time, and this will get the value of
whichever record is currently selected on the form.
Hi John,
Yar.... i only notice this now. I need to open the other
form at the same time! I am trying to hide that form but i
cant seem to hide it with this -->
[Form_OtherForm].Visible = False
 
Put a textbox on the Form with a Control Source of

=Format(Date(), "mmmm")

to show "March".


=Format(DateAdd("m", -1, Date()), "mmmm")


=Forms!OtherForm!TextboxName

The OtherForm must be open at the time, and this will get the value of
whichever record is currently selected on the form.
Hi John,
Yar.... i only notice this now. I need to open the other
form at the same time! I am trying to hide that form but i
cant seem to hide it with this -->
[Form_OtherForm].Visible = False
 
Hi John,
Yar.... i only notice this now. I need to open the other
form at the same time! I am trying to hide that form but i
cant seem to hide it with this -->
[Form_OtherForm].Visible = False

What's the point of the other form? If you're just trying to see the
*data* in the form, remember that the data is not IN the form - it's
in a Table, and the form is just a tool to allow the user to interact
with it.

Are you trying to look up data in a Table? If so, using a Form is not
an efficient way to do so! You may want to use DLookUp() to look up
the data directly from the table instead.
 
Back
Top