edit works, add doesn't

G

Guest

I have a form which pulls values from a table directly. I want to be able to
add a new row and also edit the values of any fields in an existing row (in a
separate form). The edit function works perfectly:

DoCmd.OpenForm "frm_TRA_AddBase", , , "[anBaseID]=" & Me.Text38.Value,
acFormEdit, , True

the add command, does not:
DoCmd.OpenForm "frm_TRA_AddBase", , , , acFormAdd

Can someone please help me out here, as I am sure someone knows the mistake
I am making? (unless you need more info on the form that adds/edits to the
table)
 
S

Scott McDaniel

I have a form which pulls values from a table directly. I want to be able to
add a new row and also edit the values of any fields in an existing row (in a
separate form). The edit function works perfectly:

DoCmd.OpenForm "frm_TRA_AddBase", , , "[anBaseID]=" & Me.Text38.Value,
acFormEdit, , True

the add command, does not:

What do you mean by it "does not" work? Does the form open?

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
O

OTWarrior via AccessMonster.com

it does not show an number in the "anBaseID" field on the form, it just
shows as blank. Plus it doesnt
add a new row to the table, which similar code has done elsewhere.


Scott said:
I have a form which pulls values from a table directly. I want to be able to
add a new row and also edit the values of any fields in an existing row (in a
[quoted text clipped - 4 lines]
the add command, does not:

What do you mean by it "does not" work? Does the form open?

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 

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