Adding New Record through a form

K

Katrina

I am trying to make a set of forms that will guide a user
through adding a specific set of data. I have 4 forms, "0
form" through "3 Form"

What I would like to happen is "0 form" opens, does it's
thing, then "1 form" opens, where the new record s
created. "2 Form" Opens, and then "3 Form" should open to
the recod created by "1 Form." ("1 Form" and "3 Form" are
controled by the same table "Saved Props")

I am having a problem calling up the record created in "1
Form" Also, the new record created in "1 Form" doesn't
show up in the table until I close access and reopen. I'm
pretty sure I have to do some kind of an update, but I
can't find it in the help file.

This is my code
Dim Prop As String

DoCmd.OpenForm "1 Form", , , , acFormAdd, acDialog
Prop = Forms![1 form]![Proposal #]
DoCmd.OpenForm "2 form", , , , , acDialog

DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= 'Prop'", , acWindowNormal


Any help would be appreciated.

Thanks,
Katrina
 
L

losmac

Wrong:
DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= 'Prop'", , acWindowNormal
Good:
DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= '" & Prop & "'", , acWindowNormal

Interesting idea to adding records. Try to use Wizards.
Create your own wizard. Add 4 tabs and do the same things
but a liitle different.
1 tab - some information,
2 tab - let user to put data (form1)
3 tab - save record from tab 2, let user to put data
(form2)
4 tab - show related records (form3)

Give me a sign if You need help. I'll help You (sending
example).
 
M

Michael Favor

-----Original Message-----
I am trying to make a set of forms that will guide a user
through adding a specific set of data. I have 4 forms, "0
form" through "3 Form"

What I would like to happen is "0 form" opens, does it's
thing, then "1 form" opens, where the new record s
created. "2 Form" Opens, and then "3 Form" should open to
the recod created by "1 Form." ("1 Form" and "3 Form" are
controled by the same table "Saved Props")

I am having a problem calling up the record created in "1
Form" Also, the new record created in "1 Form" doesn't
show up in the table until I close access and reopen. I'm
pretty sure I have to do some kind of an update, but I
can't find it in the help file.

This is my code
Dim Prop As String

DoCmd.OpenForm "1 Form", , , , acFormAdd, acDialog
Prop = Forms![1 form]![Proposal #]
DoCmd.OpenForm "2 form", , , , , acDialog

DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= 'Prop'", , acWindowNormal


Any help would be appreciated.

Thanks,
Katrina
.

This should help:

DoCmd.OpenForm "1 Form", , , , acFormAdd, acDialog
' you cant save a "blank" record, so put some data in a
field, as follows:
Forms![1 form]![somedata] = "something"
DoCmd.acCmdSaveRecord ' this command saves the new record
without closing the form (or access)
Prop = Forms![1 form]![Proposal #]
DoCmd.OpenForm "2 form", , , , , acDialog
' notice correct "criteria" syntax
DoCmd.OpenForm "3 Form", , , "[Prop #] = " & Prop, ,
acWindowNormal

good luck.
 
K

Katrina

Hmmm...
I didn't know you could create a wizard...
Sounds like a good idea.

I will look into this.

Thanks

(Any info you have would be helpful if you would like to
post it.)
-----Original Message-----
Wrong:
DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= 'Prop'", , acWindowNormal
Good:
DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= '" & Prop & "'", , acWindowNormal

Interesting idea to adding records. Try to use Wizards.
Create your own wizard. Add 4 tabs and do the same things
but a liitle different.
1 tab - some information,
2 tab - let user to put data (form1)
3 tab - save record from tab 2, let user to put data
(form2)
4 tab - show related records (form3)

Give me a sign if You need help. I'll help You (sending
example).
-----Original Message-----
I am trying to make a set of forms that will guide a user
through adding a specific set of data. I have 4 forms, "0
form" through "3 Form"

What I would like to happen is "0 form" opens, does it's
thing, then "1 form" opens, where the new record s
created. "2 Form" Opens, and then "3 Form" should open to
the recod created by "1 Form." ("1 Form" and "3 Form" are
controled by the same table "Saved Props")

I am having a problem calling up the record created in "1
Form" Also, the new record created in "1 Form" doesn't
show up in the table until I close access and reopen. I'm
pretty sure I have to do some kind of an update, but I
can't find it in the help file.

This is my code
Dim Prop As String

DoCmd.OpenForm "1 Form", , , , acFormAdd, acDialog
Prop = Forms![1 form]![Proposal #]
DoCmd.OpenForm "2 form", , , , , acDialog

DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= 'Prop'", , acWindowNormal


Any help would be appreciated.

Thanks,
Katrina
.
.
 
K

Katrina

Access is telling me that docmd.acsaverecord "method or
data member not found."
Any other suggestions?


-----Original Message-----
-----Original Message-----
I am trying to make a set of forms that will guide a user
through adding a specific set of data. I have 4 forms, "0
form" through "3 Form"

What I would like to happen is "0 form" opens, does it's
thing, then "1 form" opens, where the new record s
created. "2 Form" Opens, and then "3 Form" should open to
the recod created by "1 Form." ("1 Form" and "3 Form" are
controled by the same table "Saved Props")

I am having a problem calling up the record created in "1
Form" Also, the new record created in "1 Form" doesn't
show up in the table until I close access and reopen. I'm
pretty sure I have to do some kind of an update, but I
can't find it in the help file.

This is my code
Dim Prop As String

DoCmd.OpenForm "1 Form", , , , acFormAdd, acDialog
Prop = Forms![1 form]![Proposal #]
DoCmd.OpenForm "2 form", , , , , acDialog

DoCmd.OpenForm "3 Form", , , "Forms![3 Form]![Prop #]
= 'Prop'", , acWindowNormal


Any help would be appreciated.

Thanks,
Katrina
.

This should help:

DoCmd.OpenForm "1 Form", , , , acFormAdd, acDialog
' you cant save a "blank" record, so put some data in a
field, as follows:
Forms![1 form]![somedata] = "something"
DoCmd.acCmdSaveRecord ' this command saves the new record
without closing the form (or access)
Prop = Forms![1 form]![Proposal #]
DoCmd.OpenForm "2 form", , , , , acDialog
' notice correct "criteria" syntax
DoCmd.OpenForm "3 Form", , , "[Prop #] = " & Prop, ,
acWindowNormal

good luck.

.
 
M

Martin Seelhofer

Hi there
Access is telling me that docmd.acsaverecord "method or
data member not found."
Any other suggestions?

You might have to use DoCmd.RunCommand acCmdSaveRecord
instead of docmd.acsaverecord :)


Cheers,

Martin
 

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