By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,836 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,836 IT Pros & Developers. It's quick & easy.

How can I get my form to selectively include data in the table?

P: 23
Okay, this is kind of a weird question that probably has an obvious answer. I'm making a form that allows me to enter new visits for a study that has multiple visits. For example, Study1 has visits: Day1, Day2, and Day3. I have a form called "addnewvisit" that has a combo box for Study (pulled from TblStudy) and then a textbox for Visit (going to TblVisit). The combo box lists all the studies I have entered into TblStudy, which is exactly what I want. Then I free-type the visit(s), which is also what I want. The problem is that when I click "Add New Visit," the study name gets duplicated at the end of the study list. So, in TblStudy I now have Study1, Study2, Study3, then Study1 again (autonumbers 1-4). As you can see, it generates a new autonumber for the duplicated study. The visit(s) are entered perfectly into TblVisit, though, including with a corresponding autonumber (unfortunately, it uses the duplicated autonumber - in this instance "4" instead of the original "1").

My question is: how can I have the form enter the necessary information into TblVisit without adding new information to TblStudy? I have a different form that adds the study in, and that one is now working perfectly.

Here are my Form Data properties:
Expand|Select|Wrap|Line Numbers
  1. Record Source: TblStudy
  2. Filter: *blank*
  3. Order By: *blank*
  4. Allow Filters: Yes
  5. Allow Edits: Yes
  6. Allow Deletions: Yes
  7. Allow Additions: Yes
  8. Data Entry: Yes
  9. Recordset Type: Dynaset
  10. Record Locks: No Locks
  11. Fetch Defaults: Yes
Thanks so much for all your help, guys.
Nov 9 '07 #1
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 2,653
Hi, Ammanduh.

Looks like your form RecordSource is TblStudy and TblVisit join. Isn't it?
Nov 11 '07 #2

P: 23
Hi, Ammanduh.

Looks like your form RecordSource is TblStudy and TblVisit join. Isn't it?
Hi FishVal. That's correct, sorry.
Nov 21 '07 #3

Expert 2.5K+
P: 2,653
Not a problem.
Good luck.
Nov 21 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.