Tavular SubForm confusion

  • Thread starter Thread starter dbguy05
  • Start date Start date
D

dbguy05

Guest
I do have questions about tabular subforms. I have created several forms and I thought that they were linked together. The main form (GSI) is general information about each site that we visit. The tabbed forms are about various survey's done on a site. So, what I thought would happen is; I'd fill out the info on the GSI forms about each site. I'd go back after doing a survey, look up that site, click on the corresponding survey tab and add information about that survey and It would link back to the site on the GSI. What is happening is, when I pull up a site and add survey data the same survey data comes up in the next site also. I think, the problem is,

I have a switchboard with Add new site and Edit site. When I go into Edit site and I do a search by Site name, it pulls up the name, but not the record, so I'm just changing the site name by doing it that way. If I move down to the bottom of the form and scroll or move through the records that way it works right, but I need it to be more user friendly. I'm sure that there is a statement I could create to do this, but I'm not knowledgeable enough to know what it is. :confused:
 
hi - welcome!

It sounds as though your forms are not linking the records properly and when you think that you are moving through records, you're staying on the same one. It is a little hard to say what the correction is, without some additional information.

How is your data stored? In particular, is the data on the subform in the same table as the main (GSI) form?

Are you using the built-in Switchboard (from the utilities menu) for your Add and Edit option?

Can you post a very simplified (small) version of your db with just the necessary tables and forms?

- g
 
file upload

I posted a small version of the db, any help you can offer would be greatly appreciated. Thanks!
 

Attachments

Okay, I was able to take a look at the db.

1. When you click on the Edit button, you see the site info tab. All the fields that are displayed here belong to whichever record is displayed (usually the first one).

2. So, if you are looking at the first record and you change any of the information (including the pull down menus) you are changing data on the first record.

3. Only the Search button actually is moving you through the records. A good way to tell where you are is to look at the record navigation button at the bottom of the form.

I think what you are trying to do is to have a "search form" that will let you search for a record using a variety of keys. If this is what you are looking to do, it requires some moderate programming. Here are two links that might be of use -

http://www.mvps.org/access/forms/frm0045.htm

http://www.applecore99.com/tut/tut011.asp

The general approach is to build an unbound form that contains inputs for each of the things that you want to search for. You also have a "Go Search" button that activates some VBA code when clicked. The VBA code builds a query based on the values of the search fields, then retrieves the record(s) that match the criteria.

You can also look at Cascading Combo boxes as a good introduction to some of the principles involved in the search form.

- g
 

Users who are viewing this thread

Back
Top Bottom