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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add only one single record on form?

Status
Not open for further replies.

gtroiano

Technical User
Nov 7, 2001
99
US
is there a way to allow the user to add ONLY ONE record on a form based on a table. i don't want the user to see previous records or edit them. any ideas? thank!

jerry.
 
you can set the forms Data Entry property to Yes. This means that the form will not load any previously entered records.

You can find this on the data tab of the forms properties.
 
What I think you are asking is can you make a form that allows a user to add a new record and then not let them see any records they have added. In other words, you open the form add a new records and go to the next next new record, but not be able to go to the previously added record(s). The simplest way I can think of would be to set your form DataEntry property to yes, and then either disable all the navigation buttons by setting the NavigationButton Property to No or have the form close and re-open after every recrod is entered. Programming isn't a profession of choice.
It's a profession of calling...
"Hey Programmer, your application broke again!" [spin]

Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@citi.com
 
mswilson16,

thanks. i got that bit down. now i need the form to stop allowing additional records to be added after the first one.
any idea?

jerry.
 
Based on your last post you want the user to be able to enter only one record - that's it, no more, no less.....two option. The first would be to simply close the form....Why keep it open??? The second is using the OnCurrent Event for the form (which is fired every time the record is changed) set the NavigationButtons Property to No and the AllowAdditions Porperty to No. The user now opens the form set to DataEntry Yes, enters one record, and when they "move" to the next record, the navigation buttons are gone to go back and the additions property is set to no. Programming isn't a profession of choice.
It's a profession of calling...
"Hey Programmer, your application broke again!" [spin]

Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@citi.com
 
Robert,

thanks for the help. unfortunetly, the form in question is a pop up form that adds records to a combo box. the problem is that the on current event fires when the form is opened thus not allowing additions at all. anyway, i worked around it by just plain old getting rid of the form and now i have it added directly to the table. thanks again for the help though.

jerry.[pc]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top