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

Populating a form with existing data

Status
Not open for further replies.

JianBean

Technical User
Oct 26, 2003
26
US
I'm sorry guies, I've looked through quite a few posts here, and I just can't quite seem to get this to work, but I really need it to work by tomorrow! AHHHH!

Here goes:
I've got a list of products set-up in various tables, all linked through relationships so that everything can be referenced and what-not. My problem came when I created a form, the form has a SKU and Description field and a sub-form, containing data such as serial number and sale date. I can browse through the records just fine with the record forward and back buttons at the bottom, but if I try to type in a SKU at the top of the form, it does repopulate the sub-form with all of the S/N for that product, but if I try to move the cursor, it says that it would create a duplicate entry and cannot do it.

The user is not allowed to enter new S/N's, SKUs, or Descriptions, nor are they allowed to change them, so my question is, how do I pull up the existing record, and not create a new one, so that sale date and information can be changed.

Thank you for the help!

-Bean
 
Bean

This not that hard -- use unbound combo box(es) to retrieve the appropriate record; lock the fields the end user is not to touch; lastly set the form not to allow additions.

You can use the combo box wizard for finding a record. You can use more sophisticated techniques as your skill improves.

You can use the form properties to perform the remainder of the tasks. (To open the property window: From the main menu, select View -> Properties) Select the properties for the entire form. (Click on the box in the top left where the vertical and horizontal rulers meet.)

On the Data tab for the property window, find the "AllowAdditions" and set the value to "No". Ditto for "AllowDeletions".

Now select the fields you want to lock down. Again on the Data tab of the property window, select the "Locked" field to "Yes".

Richard
 
Thanks Richard!

That was exactly what I wanted! I'm sorry for my incompitence! I should have figured that out! I had everything done, except I had the combobox bound instead of unbound!
I had the controls locked, forms did not allow for additions/deletions! AHHHH! Something so simple!

But again thank you! I'm usually not this dumb, but sometimes! Maybe it was just too late last night!

-Bean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top