Show Default

A

awach

I have a form where the default value for [SLastName] is the same for
[CLastName]. However, I can't get it to show up on the form without using
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
R

ruralguy via AccessMonster.com

Set the value of [SLastName] in the AfterUpdate event of the [CLastName]
control!
Me.[SLastName] = Me.[CLastName]
I have a form where the default value for [SLastName] is the same for
[CLastName]. However, I can't get it to show up on the form without using
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
A

awach

Will it still be the default value, i.e. will the user be able to change it
if desired?

ruralguy via AccessMonster.com said:
Set the value of [SLastName] in the AfterUpdate event of the [CLastName]
control!
Me.[SLastName] = Me.[CLastName]
I have a form where the default value for [SLastName] is the same for
[CLastName]. However, I can't get it to show up on the form without using
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
A

awach

It says "Microsoft Access can't find the macro 'Me.' " What should I do?

ruralguy via AccessMonster.com said:
Set the value of [SLastName] in the AfterUpdate event of the [CLastName]
control!
Me.[SLastName] = Me.[CLastName]
I have a form where the default value for [SLastName] is the same for
[CLastName]. However, I can't get it to show up on the form without using
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
R

ruralguy via AccessMonster.com

You need to invoke the code builder. On the row for AfterUpdate, press the
builder button "..." and select code builder. Put the code before the End
Sub line. The user will still be able to change it.
It says "Microsoft Access can't find the macro 'Me.' " What should I do?
Set the value of [SLastName] in the AfterUpdate event of the [CLastName]
control!
[quoted text clipped - 4 lines]
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
A

awach

It's still not working out. I wasn't sure whether I was supposed to put the
! or not but I tried it without and it said it needed to be debugged. I
tried it with and it produced the error "Invalid or unqualified reference."
I'm not very good with the codes so any help would be awesome!

ruralguy via AccessMonster.com said:
You need to invoke the code builder. On the row for AfterUpdate, press the
builder button "..." and select code builder. Put the code before the End
Sub line. The user will still be able to change it.
It says "Microsoft Access can't find the macro 'Me.' " What should I do?
Set the value of [SLastName] in the AfterUpdate event of the [CLastName]
control!
[quoted text clipped - 4 lines]
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
R

ruralguy via AccessMonster.com

Just use a period for now.

MsgBox "Testing"
Me.[SLastName] = Me.[CLastName]

Put the MsgBox in and we'll see if you get it to display.
It's still not working out. I wasn't sure whether I was supposed to put the
! or not but I tried it without and it said it needed to be debugged. I
tried it with and it produced the error "Invalid or unqualified reference."
I'm not very good with the codes so any help would be awesome!
You need to invoke the code builder. On the row for AfterUpdate, press the
builder button "..." and select code builder. Put the code before the End
[quoted text clipped - 7 lines]
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
A

awach

That works! Thanks so much!

ruralguy via AccessMonster.com said:
Just use a period for now.

MsgBox "Testing"
Me.[SLastName] = Me.[CLastName]

Put the MsgBox in and we'll see if you get it to display.
It's still not working out. I wasn't sure whether I was supposed to put the
! or not but I tried it without and it said it needed to be debugged. I
tried it with and it produced the error "Invalid or unqualified reference."
I'm not very good with the codes so any help would be awesome!
You need to invoke the code builder. On the row for AfterUpdate, press the
builder button "..." and select code builder. Put the code before the End
[quoted text clipped - 7 lines]
the CTRL+SHIFT+SPACE keystroke. Is there a way to make the default value
appear everytime as soon as [CLastName] is entered?
 
Top