"Can't find the macro "Me!transferdate"

  • Thread starter Thread starter Meg
  • Start date Start date
M

Meg

I have a form where I want the default value of
transferdate to be the value of the previous record. I
saw an earlier post on this board which said to put the
followingcode in the AfterUpdate event of the control for
the record:

Me!transferdate.DefaultValue = Me!Transferdate

However I get the following error message:
"Can't find the macro 'Me!Transferdate...."

Oh please wise ones, what am I doing wrong?

Thanks in advance.
 
-----Original Message-----
I have a form where I want the default value of
transferdate to be the value of the previous record. I
saw an earlier post on this board which said to put the
followingcode in the AfterUpdate event of the control for
the record:

Me!transferdate.DefaultValue = Me!Transferdate

However I get the following error message:
"Can't find the macro 'Me!Transferdate...."

Oh please wise ones, what am I doing wrong?

If the control TransferDate holds a date field, you must
type it by

Me!TransferDate.DefaultValue = "#" & Me!TransferDate & "#"

It's also a good idea to name your control something other
than the name of the underlying field to avoid conflicts,
and to use a three digit prefix to identify the type of
control in your code:

txt Textbox
cbo Combo Box
lbl Label
.... etc.

For more on naming conventions, search Google on "Access
Naming Conventions".

HTH
Kevin Sprinkel
 
Are you perchance typing this line into the property sheet of your control?
A name entered there can invoke a macro.

The line of code you want to use is VBA, not a macro.
Select [Event Procedure] in the drop-box on the property sheet, then click
on the 3 dots at the end of the line.
A code window will open up to just the place you need to enter this line of
code.

HTH
- Turtle
 
I had tried that but when I typed it into the VBA area,
the date of "12/30/1899" appears in the date.
-----Original Message-----
Are you perchance typing this line into the property sheet of your control?
A name entered there can invoke a macro.

The line of code you want to use is VBA, not a macro.
Select [Event Procedure] in the drop-box on the property sheet, then click
on the 3 dots at the end of the line.
A code window will open up to just the place you need to enter this line of
code.

HTH
- Turtle

Meg said:
I have a form where I want the default value of
transferdate to be the value of the previous record. I
saw an earlier post on this board which said to put the
followingcode in the AfterUpdate event of the control for
the record:

Me!transferdate.DefaultValue = Me!Transferdate

However I get the following error message:
"Can't find the macro 'Me!Transferdate...."

Oh please wise ones, what am I doing wrong?

Thanks in advance.


.
 
Worked - thanks!
-----Original Message-----

If the control TransferDate holds a date field, you must
type it by

Me!TransferDate.DefaultValue = "#" & Me!TransferDate & "#"

It's also a good idea to name your control something other
than the name of the underlying field to avoid conflicts,
and to use a three digit prefix to identify the type of
control in your code:

txt Textbox
cbo Combo Box
lbl Label
.... etc.

For more on naming conventions, search Google on "Access
Naming Conventions".

HTH
Kevin Sprinkel
.
 
That's the equivalent of a 0 date.

HTH
- Turtle

I had tried that but when I typed it into the VBA area,
the date of "12/30/1899" appears in the date.
-----Original Message-----
Are you perchance typing this line into the property sheet of your control?
A name entered there can invoke a macro.

The line of code you want to use is VBA, not a macro.
Select [Event Procedure] in the drop-box on the property sheet, then click
on the 3 dots at the end of the line.
A code window will open up to just the place you need to enter this line of
code.

HTH
- Turtle

Meg said:
I have a form where I want the default value of
transferdate to be the value of the previous record. I
saw an earlier post on this board which said to put the
followingcode in the AfterUpdate event of the control for
the record:

Me!transferdate.DefaultValue = Me!Transferdate

However I get the following error message:
"Can't find the macro 'Me!Transferdate...."

Oh please wise ones, what am I doing wrong?

Thanks in advance.


.
 
Back
Top