Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get my form to open in proper dataentry mode using ADO

Status
Not open for further replies.

janeatwork

Programmer
Dec 12, 2002
16
GB
hello everyone,

I’m trying to convert my existing database to ADO. The problem is that I can’t work out how to get my forms to open in the same way using ADO as they would open if they were bound to a table or query.

I want my form to open in DataEntry Mode. My form bound to a query or table would open with a blank screen. At the bottom it would say record 1 of 1. Opening the form based on a recordset, does give me a blank screen, but it now says at the bottom Record 14590 of 14590, which means I can scroll up to existing records, which I definitely don’t want anyone to do.

Can anyone suggest a solution.

My form is set as,

AllowEdits – Yes
AllowDeletions – No
AllowAdditions – Yes
DataEntry – Yes

When the form loads,


Set Me.Recordset = rst
Reference all the controls then
With rst
.AddNew
End With

Thankyou

 
In your form properties, Put the Record Selectors and Navigation buttons to off. This will take the selectors from the form and the user won't be able to scroll. Hope this helps.
 
Thanks compucop for your suggestion, but what I really want to know is how to open a form in dataentry mode using ADO. The user can still press pgup and pgdn and use the mouse wheel to navigate previous records.

It's my fault using the record selectors as an example, I don't want the form to be loading records unnecessarily.

Why does the form ignore the dataentry - yes instruction?
Thanks.

 
Hi Jane,

Set the Form property 'DataEntry' (on the Data tab) to true.

The form will open by default to the last (blank (or new) record).

N.B. This sets the default, if you reset it in code (by changing other related properties), then it may be overrided.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." AND "A pointer to a solution is better than the solution - you'll remember the solution via a pointer". darrylles@totalise.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top