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

Data Entry Form for Access 97

Status
Not open for further replies.

stephenj789

Technical User
Jan 28, 2002
58
US
I have a database with several tables. One table, "Table A" is imported from another database (which I can't write to). Another table, "Table B" is a table of data that I have created, which shares a common field with "Table A":

Table A Table B
Item Item
Info

Table A has all the items, no new items can be added to Table A. There is a one-to-one relation ship between the tables and there are no duplicates in "Item" in either table.

Here is what I would like to do: I would like to create a data-entry form that allows the user to select the "Item" from Table A (from a combo-box) and show the field "Info" in table B in a text box that will allow the user to update the "Info" field for the related "Item" in Table B. If the "Item" isn't in Table B, I would like Table B to be updated with the "Item" as well as the "Info" field. For example:

Table A
Item: 123
Item: 456

Table B
Item: 123
Info: Cat

User selects item 123 on the form and "Cat" shows up on the data entry field of the form. User changes the info to "Dog". Now Table B looks like this:

Table B
Item: 123
Info: Dog

User selects item 456 on the form and there is a blank in the data entry field of the form. User enters "Rat" in the data entry field of the form. Now Table B looks like this:

Table B
Item: 123
Info: Dog
Item: 456
Info: Rat


The reason I am posting to this group rather than the Access forms group is because I believe that some VBA code will be needed to do this.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top