W
WDSnews
man! I was just starting to feel a little bit competent. Add New Record
should be one of the most basic tasks. If only there were a book called
"How not to be an idiot for dummies". I've spent many hours researching the
possible ways of adding a record until I'm completely befuddled about the
right strategy to use in Access. What seemed to work for one person caused
problems for another. It was completely unclear when I was looking at ADO
examples, DAO examples, Access examples, etc. I want to use ADO rather than
DAO for hope of future advantages, or perhaps a method that is independent
of ADO and DAO.
In the past I've relied on the user to create a new record and I've enjoyed
Access coding features like .defaultvalue to autofill various fields for me,
while allowing the user to change their mind. However in this case, I
definitely want to create a new record with code and fill-in the fields with
code.
I want my subform records to appear in reverse order, with newest on top.
After a new record is added, I want it to show at the top of the list. My
subform uses a table as its data source. Should I use a query instead?
As I understand it, there are four possible strategies, but I don't know why
I'd choose one over the other...
1. Open a new recordset with ADODB.Connection and ADODB.Recordset
2. Clone a recordset
3. Address the subform control
4. Address the subform
Which strategy should I use?
What does that strategy's Add New Record command look like?
Do I need to requery? update? resort?
How do I get the new record to display in the subform? on top?
should be one of the most basic tasks. If only there were a book called
"How not to be an idiot for dummies". I've spent many hours researching the
possible ways of adding a record until I'm completely befuddled about the
right strategy to use in Access. What seemed to work for one person caused
problems for another. It was completely unclear when I was looking at ADO
examples, DAO examples, Access examples, etc. I want to use ADO rather than
DAO for hope of future advantages, or perhaps a method that is independent
of ADO and DAO.
In the past I've relied on the user to create a new record and I've enjoyed
Access coding features like .defaultvalue to autofill various fields for me,
while allowing the user to change their mind. However in this case, I
definitely want to create a new record with code and fill-in the fields with
code.
I want my subform records to appear in reverse order, with newest on top.
After a new record is added, I want it to show at the top of the list. My
subform uses a table as its data source. Should I use a query instead?
As I understand it, there are four possible strategies, but I don't know why
I'd choose one over the other...
1. Open a new recordset with ADODB.Connection and ADODB.Recordset
2. Clone a recordset
3. Address the subform control
4. Address the subform
Which strategy should I use?
What does that strategy's Add New Record command look like?
Do I need to requery? update? resort?
How do I get the new record to display in the subform? on top?