help on form!!!

Z

zax288

hi i am new to access.. n i have this qns...

Create a form that has a labeled text inputs like
the following:
• Name: ______________________
• Address: ____________________
• Date of Birth (YYYYMMDD): _________
• Message: _______________________

This part is still manageable as i can use the form wizard. the prob is in
the next part below.

• It should have a button that says : “Submit†-- Q: what button shd i use
for this "submit" thingy?

• When clicked, it should display “Hello, [Name].
You were born on [DOB] and you stay at
[Address].†Q: so what function is this qns asking for exactly? i tried using
msg box in macro.. but the message that came out jus can't display the
individual names!!! n i m foreign to code.

is there a simple way to achieve the above display msg?
 
A

Arvin Meyer [MVP]

zax288 said:
hi i am new to access.. n i have this qns...

Create a form that has a labeled text inputs like
the following:
. Name: ______________________
. Address: ____________________
. Date of Birth (YYYYMMDD): _________
. Message: _______________________

This part is still manageable as i can use the form wizard. the prob is in
the next part below.

. It should have a button that says : "Submit" -- Q: what button shd i use
for this "submit" thingy?


What do you want to submit? On bound forms, the data is automatically saved.
. When clicked, it should display "Hello, [Name].
You were born on [DOB] and you stay at
[Address]." Q: so what function is this qns asking for exactly? i tried
using
msg box in macro.. but the message that came out jus can't display the
individual names!!! n i m foreign to code.

is there a simple way to achieve the above display msg?

You should not be using "Name" as a field or control name. It is a reserved
word.

You can do a message box in VBA code:

MsgBox "Hello, " & Me.[FullName] & ". You were born on " & Me.[DOB] " and
you stay at " & Me.[Address] & "."

In a macro, it would be something like:

"Hello, " & Forms!FormName![FullName] & ". You were born on " &
Forms!FormName![DOB] " and you stay at " & Forms!FormName![Address] & "."
 
Z

zax288 via AccessMonster.com

Hi tks for the tip

so the trick is to change the field name to 'Full Name' instead. i put it as
'name initially bcos it was in the requirement. i have no idea what's the
effect. :)

so where shd i type the following in macro? is it in 'argument' in the macro
pg? (sry.. i m reli new to access! esp macro).
the form name is what i have named the form? eg: Form Ex 1

"Hello, " & Forms!FormName![FullName] & ". You were born on " &
Forms!FormName![DOB] " and you stay at " & Forms!FormName![Address] & "."

hi i am new to access.. n i have this qns...
[quoted text clipped - 10 lines]
. It should have a button that says : "Submit" -- Q: what button shd i use
for this "submit" thingy?

What do you want to submit? On bound forms, the data is automatically saved.
. When clicked, it should display "Hello, [Name].
You were born on [DOB] and you stay at
[quoted text clipped - 4 lines]
is there a simple way to achieve the above display msg?

You should not be using "Name" as a field or control name. It is a reserved
word.

You can do a message box in VBA code:

MsgBox "Hello, " & Me.[FullName] & ". You were born on " & Me.[DOB] " and
you stay at " & Me.[Address] & "."

In a macro, it would be something like:

"Hello, " & Forms!FormName![FullName] & ". You were born on " &
Forms!FormName![DOB] " and you stay at " & Forms!FormName![Address] & "."
 
L

Linq Adams via AccessMonster.com

This is obviously a learning assignment, either self-imposed or part of an
instructional class! Hasn't the book, if self-learning, or the your
instructor given you any guidance in this?
 
A

Arvin Meyer [MVP]

Actually, there are no fields in forms. They are called controls and they
are (in Access) often bound to data in underlying fields. I'd use the name
FullName, instead of Full Name, to make it easier for Access to resolve it.
As a matter of fact, the text box holding FullName should be named
txtFullName so there's no confusion between a field and a control.

As for as where you'd type it:

Action: MsgBox

Message: "Hello, " & Forms!FormName![FullName] & ". You were born on " &
Forms!FormName![DOB] " and you stay at " & Forms!FormName![Address] & "."

The Message area is at the bottom left. Also not that "FormName" must be
replaced with the actual name of your open form.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


zax288 via AccessMonster.com said:
Hi tks for the tip

so the trick is to change the field name to 'Full Name' instead. i put it
as
'name initially bcos it was in the requirement. i have no idea what's the
effect. :)

so where shd i type the following in macro? is it in 'argument' in the
macro
pg? (sry.. i m reli new to access! esp macro).
the form name is what i have named the form? eg: Form Ex 1

"Hello, " & Forms!FormName![FullName] & ". You were born on " &
Forms!FormName![DOB] " and you stay at " & Forms!FormName![Address] & "."

hi i am new to access.. n i have this qns...
[quoted text clipped - 10 lines]
. It should have a button that says : "Submit" -- Q: what button shd i
use
for this "submit" thingy?

What do you want to submit? On bound forms, the data is automatically
saved.
. When clicked, it should display "Hello, [Name].
You were born on [DOB] and you stay at
[quoted text clipped - 4 lines]
is there a simple way to achieve the above display msg?

You should not be using "Name" as a field or control name. It is a
reserved
word.

You can do a message box in VBA code:

MsgBox "Hello, " & Me.[FullName] & ". You were born on " & Me.[DOB] " and
you stay at " & Me.[Address] & "."

In a macro, it would be something like:

"Hello, " & Forms!FormName![FullName] & ". You were born on " &
Forms!FormName![DOB] " and you stay at " & Forms!FormName![Address] & "."
 

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

Top