Form Newbie Questions

J

Jim Deck

Thanks to the "Access 2000 VBA" book, I've nearly successfully created a
form with buttons to help me manage a membership database. However, here
are some problems I'm encountering:
- While my form successfully adds a new record to the membership table
via a button and VBA code, I cannot get it to display with
"DoCmdGoToRecord,, acNewRec" as I get an error message "You can't go to that
record". Yet, if I close the form, the new record is in the table exactly
as it should be and it can be displayed by other buttons on reopening the
form. What have I missed?
- Also, I've created buttons to help me find and display records in the
membership table that do indeed work just fine. However, I'd like to be
able to edit values in the record displayed but cannot quite determine how
to accomplish this.
If you can help, email me directly to save bandwidth.

Thanks in advance,
Jim Deck
 
T

test

Do you realize that if you create a form from a table using any of the
standard Wizards, the created form will automatically be able to find, add,
edit & delete records from that table, without writing any code at all?

HTH,
TC
 
D

Dorian

You are tring to defeat Access's standard behaviour which is to do adds and updates automatically. To make these things happen via command buttons, I've found it best to make the form controls UNBOUND. That creates a lot of work, however, since you are respoponsible for populationg every control and for creating the SQL to read and write records. Your work increases probably 500%.
 

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