create another field during running the Form

  • Thread starter wazza w via AccessMonster.com
  • Start date
W

wazza w via AccessMonster.com

hi

seem like i am running the Database Access and running the Form, and create a
button that to add extra fields such as User1.LastName and User1.FirstName,
and during the Form you press a button "Insert Extra User" you will see
another User2.LastName and User2.First and maybe you can have 100 users in
the same Form when it's running not during View Form...

Thank you very much,
 
J

John Vinson

hi

seem like i am running the Database Access and running the Form, and create a
button that to add extra fields such as User1.LastName and User1.FirstName,
and during the Form you press a button "Insert Extra User" you will see
another User2.LastName and User2.First and maybe you can have 100 users in
the same Form when it's running not during View Form...

Thank you very much,

WHOA.

You're WAY off track.

If you want to add 100 users - add 100 *RECORDS*, not 100 *fields*.

What is your table structure? What do you mean by "running" a Form? A
form isn't an executable program; it's a window, a way to enter data.
By default, a Form automatically lets you add new records - just press
the *> button on the navigation bar at the bottom and you're on the
new record; or of course you can go to the new record a dozen other
ways.

I also don't understand what you mean by "when it's running not during
View Form". Could you explain? Do you perhaps want a Continuous Form
view so that you can see multiple users onscreen at once?


John W. Vinson[MVP]
 
W

wazza w via AccessMonster.com

actually, do you know when you go form and double click on the file? and you
see that the form is working and you just have to put the data entry in it?
so in the same time, seem you are filling the last and first name and then
you want to add another partner , so you will press on the button to insert
more person, and when you press it, you will see another field has been
creater under the Last and First Name. Means ==
this is before you add another partner
first Name : Last Name:
"insert more partner"(that's the button)
address: postcode:
telephone


here when you press the button, you will see like
first Name : Last Name:
"insert more partner"(that's the button)
firstName: LastName:
address: postcode:
telephone

hopefully this will be clear for you.
by the way i dont want to use form inside the form.

thank you very much


John said:
[quoted text clipped - 5 lines]
Thank you very much,

WHOA.

You're WAY off track.

If you want to add 100 users - add 100 *RECORDS*, not 100 *fields*.

What is your table structure? What do you mean by "running" a Form? A
form isn't an executable program; it's a window, a way to enter data.
By default, a Form automatically lets you add new records - just press
the *> button on the navigation bar at the bottom and you're on the
new record; or of course you can go to the new record a dozen other
ways.

I also don't understand what you mean by "when it's running not during
View Form". Could you explain? Do you perhaps want a Continuous Form
view so that you can see multiple users onscreen at once?

John W. Vinson[MVP]
 
J

John Vinson

actually, do you know when you go form and double click on the file? and you
see that the form is working and you just have to put the data entry in it?
so in the same time, seem you are filling the last and first name and then
you want to add another partner , so you will press on the button to insert
more person, and when you press it, you will see another field has been
creater under the Last and First Name. Means ==
this is before you add another partner
first Name : Last Name:
"insert more partner"(that's the button)
address: postcode:
telephone


here when you press the button, you will see like
first Name : Last Name:
"insert more partner"(that's the button)
firstName: LastName:
address: postcode:
telephone

You're making this harder than it is.

No code is needed.
No button is needed.
No message is needed.

Access Forms do this automatically; if you tab off the last field in
the tab order, you will be presented with a new blank record, ready to
be filled in.

If you WANT a button to do this, you can do so; create the button,
call it cmdNewRecord, set its Caption property to "insert more
partner", and view its Properties. On the Events tab find the Click
property, and click the ... icon by it. Select the Code Builder and
edit the code to:

Private Sub cmdNewRecord_Click()
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson[MVP]
 
W

wazza w via AccessMonster.com

ok but it's still error when i put this :DoCmd.GoToRecord acForm, Me.Name,
acNewRecord




John said:
actually, do you know when you go form and double click on the file? and you
see that the form is working and you just have to put the data entry in it?
[quoted text clipped - 14 lines]
address: postcode:
telephone

You're making this harder than it is.

No code is needed.
No button is needed.
No message is needed.

Access Forms do this automatically; if you tab off the last field in
the tab order, you will be presented with a new blank record, ready to
be filled in.

If you WANT a button to do this, you can do so; create the button,
call it cmdNewRecord, set its Caption property to "insert more
partner", and view its Properties. On the Events tab find the Click
property, and click the ... icon by it. Select the Code Builder and
edit the code to:

Private Sub cmdNewRecord_Click()
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson[MVP]
 
J

John Vinson

ok but it's still error when i put this :DoCmd.GoToRecord acForm, Me.Name,
acNewRecord

Where are you putting this? Which event, on which control? Please copy
and paste the actual code.

John W. Vinson[MVP]
 
W

wazza w via AccessMonster.com

actually you were talking about Add New Record, and i didn't want that....
as i showed you the example before, and this something to do with VB.net or
anything you can do,

this is before you add another partner
1) first Name : Last Name:
"insert more partner"(that's the button)
address: postcode:
telephone

here when you press the button, you will see like
1) first Name : Last Name:
2) firstName: LastName:
"insert more partner"(that's the button)
address: postcode:
telephone

and remember i don't want to use subform, and this insert more partner should
be dragged down automatically when you add extra partner.

hopefully that will help you.
by the way about the code, i need the code from you if you help or give me a
files with samples example to my email: [email protected]

thank you.
 
Top