
AddNew DON'T work, Need HELP!!!
Hi there!
I have a problem that I can't figure out... it theory it is a very
simple procedure. I want to add a new record to a table named "Changes".
from VB I have to data controls data1, data2 on the same form.
Data1 is the one connected to the the table "changes" data2 is connected to the
table "Files"
Now, when a user wants to add a record, a change, In order to validate the
file name, I have a combo box (data2) that lists the valid file names
in the table files <- data2. This is to avoid user error when they enter the
data.
So I have a button called "change name" that lists the valid field names,
by populating the combobox.
So far so good... now, after they clicked the AddNew button (data1.AddNew),
The only 3 buttons available are cancel, update (to save the record) and
change field name. So they are supposed to go select the name of the file from
the combobox, and enter information about the changes made to the file.
Then when all is done they are supposed to click Update to save the records.
The PROBLEM is... IT IS NOT ADDING A NEW RECORD! It OVER writes the record
that was there...
So I only have one record at any time! Addnew, movenext moveprevious
thats all that is should take no?
Now, pehaps the fact that I have the following upon loading the form
data1.recordsource = (find all record for the current projectid)
and data2 is only used to populate the combo box, then I do a
data1.edit
data1.recorset.fields("Name").value = combo1
data1.refresh
data1.movenext
data1.moveprevious
Why isn't adding the record? is data1 pointer not moving at all?
Do you think this comes from setting data to the recordsource query, I don't
think so, since I do the same on a similar form and I can still addnew and
delete records.
I am stuck good! In fact i don't think that the name field is geting updated
when I say ....("name").value = combo1.
Arrghhhh!!!
Any suggestions? If you need more info I will be more than glad to
send the code.
Thanks a million.
George