By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Problem with edit form

P: n/a
Thanks for any help - I have a form to enter records. It works fine. It
is crowded with over 30 fields. It has as its datasource a table (maybe
it should be a query of that table?). What I want to do is to take this
form, copy it, and turn it into a form for editing those records. I
would like to take my keyfield textbox for the record number (which is
an auto-number), and turn it into a combo box to bring up a list of the
records. Then upon finding the record, making data changes and saving
it. I just have ran into several errors trying to do this task.
Thanks! Bhavesh

Oct 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
pa*************@yahoo.com wrote:
Thanks for any help - I have a form to enter records. It works fine. It
is crowded with over 30 fields. It has as its datasource a table (maybe
it should be a query of that table?). What I want to do is to take this
form, copy it, and turn it into a form for editing those records. I
would like to take my keyfield textbox for the record number (which is
an auto-number), and turn it into a combo box to bring up a list of the
records. Then upon finding the record, making data changes and saving
it. I just have ran into several errors trying to do this task.
Thanks! Bhavesh
Wouldn't it be better to have 1 form that can add/edit records?

You could have a combo box to find records.

You could use navigation buttons to go record to record and even to to a
new record. You could even put a button to go to a new record and use
something like
DoCmd.GoToRecord acDataForm, "FormName", acNewRec

In your combo have a list of all records.

In the forms OnCurrent event do something like
If Not Me.NewRecord Then
Me.ComboBox = Me.ID 'ID is assumed form's id field name
Else
Me.ComboBox = Null
Endif

In the ComboBox AfterUpdate event do something like
DIm rst As Recordset
Set rst = Me.Recordsetclone
rst.findfirst "ID = " & Me.ComboBox
Me.bookmark = rst.bookmark
rst.close
set rst = Nothing
Oct 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.