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

Add New Record to an Unbound Datasheet Form

Status
Not open for further replies.

ddsrini

Programmer
Jun 20, 2002
4
US
I have a form that is unbound. It has a combo box and three text fields all of them unbound. Combo box is getting values from a table. When I change the properties of the form to make it a Datasheet and when I run this form I am not able to add records to this form. How do I do this so that it allows me to add new records. The fields have to be unbound.

Thanks
 
You can only add one record at a time to an unbound form no matter what view you have it in. Therefore, datasheet view would only allow you to enter data into the controls once.

Hope this helps.

OnTheFly
 
This is a direction to think about.

How about, instead of trying to have a datasheet view of the form, where there is one text box for each field, you decide how many rows you want to appear on the datasheet and create one text box for each field for each row. Then use code to read a record and fill in the first set of fields. Then read another record and fill in the next set of fields, etc. It seems to me that it would be very complex but do-able.
 
You might be better off creating a temp table to bind the form to. You can then add as many records as you want, edit or delete them at will and then program a Save option to commit them to the actual table if the user want to.

That way you can delete the records easily should you not want to save them.

Just a thought.

Hope this helps.

OnTheFly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top