473,654 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple link criteria and new records

I am working on a database to be used for auditing medical groups.
TABLE:DETAILS contains these fields:

[Review ID] (autonumber)
[Date]
[Auditor]
50 group fields [1] through [50] each a combo box that pulls from the
same list of 100+ groups

Each group is audited by reviewing 10-20 patient records. This
information is stored in TABLE:WS and contains the fields:

[ID] (autonumber)
[Review ID] links to TABLE:DETAILS (many-one)
[Group] contains value from one of the fields [1] through [50]
Other fields

The problem I am running into is that I can open the form where
[Review ID]=[Review ID] and [Group]=[1], etc. for each one, but it
will only show existing records, not add new records with both the
[Review ID] and [Group] assigned. Instead, I get a no related record
error message.

This is what I am using:
stLinkCriteria = "[Review ID]=" & Me![Review ID] & " And [Group]='" &
Me![1] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

The form has a subform and BOTH are from TABLE:WS using [Review ID]
and [Group] as link criteria.

I know it's awkward to have each group as a different item on the
Details table and then equal the same value in the WS table, but with
such a large number varying every month, I really couldn't see a
better way to do it.

I'm usually pretty good at reading existing answers, but this one has
me stumpted. Any suggestions?

Thanks! April (ap****@scanhea lthplan.com)
Nov 12 '05 #1
1 4591
af******@yahoo. com (April) wrote in message news:<a4******* *************** ****@posting.go ogle.com>...
I am working on a database to be used for auditing medical groups.
TABLE:DETAILS contains these fields:

[Review ID] (autonumber)
[Date]
[Auditor]
50 group fields [1] through [50] each a combo box that pulls from the
same list of 100+ groups

Each group is audited by reviewing 10-20 patient records. This
information is stored in TABLE:WS and contains the fields:

[ID] (autonumber)
[Review ID] links to TABLE:DETAILS (many-one)
[Group] contains value from one of the fields [1] through [50]
Other fields


I'm not saying this is the way you should do it, but consider the
following structure:

ReviewDetails Groups Reviews
ReviewDetailID (PK) GroupID (PK) ReviewID (PK)
ReviewID GroupName ReviewName
GroupID ReviewDate
OtherFields...

Note: Watch out for names like Group, Detail, Date because
Access uses those names for other things and can get confused.

Reviews acts similar to an Orders Table. ReviewDetails acts similar
to an OrderDetails Table with the exception that the OrderDetails
can be changed later. Use the main form for Reviews. Once you
are on a specific Review you can set the RecordSource for the subform
so that ReviewDetails can be edited/added to. The code for adding
a new line (if you use code here) needs to ensure that the current
ReviewID gets duplicated and that an appropriate ReviewDetailID
(perhaps AutoNumber) gets assigned.

Alternatively, you can have a subform for Reviews and another subform
for ReviewDetails. On the Form_Current() event of the first subform
you can Call Form_frmMain.Re querySubformDet ails(CStr(Me.Re viewID))
where:

Public Sub RequerySubformD etails(strRevie wID As String)
'Set SubformDetails. Visible = false in Design mode and make visible to
make startup act reasonable
If SubformDetails. Visible = False Then
SubformDetails. Visible = True
Exit Sub
End If
SubformDetails. Form.RecordSour ce = "SELECT * FROM ReviewDetails WHERE
ReviewID = " & strReviewID & " ORDER BY ReviewDetailID; "
SubformDetails. Form.Refresh
'This line might be superfluous:
SubformDetails. Form.Repaint
End Sub

is behind frmMain. Then when you click on a Review in the top
subform, the corresponding ReviewDetail records show up in the bottom
subform. There are even other ways to accomplish this. The structure
you showed makes it difficult to find any reasonable way to get what
you want. Plus, you are no longer limited to a 50 group audit (groans
coming from the auditors).

James A. Fortune
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
371
by: April | last post by:
I am working on a database to be used for auditing medical groups. TABLE:DETAILS contains these fields: (autonumber) 50 group fields through each a combo box that pulls from the same list of 100+ groups Each group is audited by reviewing 10-20 patient records. This
3
1894
by: Ron Nolan | last post by:
I have a large application that contains lots and lots of financial history data. The history data is currently set up in a table called 'TblHist' that exists inside each of these three .mdb files. Each .mdb has approx. 175k rows in its history table. HistData2001.mdb - history data in TblHist for year 2001 HistData2002.mdb - history data in TblHist for year 2002 HistData2003.mdb - history data in TblHist for year 2003. (All .mdb's...
4
5359
by: carl.barrett | last post by:
Hi, I have a list box that displays 2 columns. Behind it sits a query with five columns. These are Column1 (DOB), column2 (a concatenated string of Surname Forname, Title), Column3 (Surname), column4 (Forename) and column5 (title). Columns 3,4 and 5 are not shown in the list box only the first two. DOB Name: &" "&&", "&
6
4618
by: Ralph2 | last post by:
Some time ago with a lot of help from this group I made a reasonably successful database to keep track of our shop drawings. However the searching mechanism is too complicated for the occasional user and I would like to change the whole process. I would like to duplicate the layout of my form... but each field becomes a simple "searching" ListBox. On completing any one search field all the rest are filtered to this value. Subsequent...
19
3463
by: davidgordon | last post by:
Hi, I need some pointers/help on how to do the following if it possible: In my access db, I have the following: Tables: Products, Sub-Assembly, Product-Pack Table, Products
6
4984
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing for long running reports. When the processing is complete it uses crystal reports to load a template file, populate it, and then export it to a PDF. It works fine so far....
2
2726
by: jennk | last post by:
i am working in Access 97, our database tables are linked from ODBCsqlsvr (not even sure what that means). i have a table where each record has a unique customer and their order information. there are 20 possible items to be ordered. i need a query that will return a unique row for every item ordered. if the same customer (record) orders 3 items, i need the query to return 3 rows. Each row will have the same customer info (name, address,...
6
9413
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate report" button located on my form to print all of the list box values (that have been updated via selection from combo boxes) from the form to the report. I've tried using a macro with the code: Macro Name: cmdGenerateReport : On Click Action:...
0
2077
by: redpears007 | last post by:
Morning all! :) I have a database with multiple linked tables. I have created a search form with one txt box, for entering search criteria, and a listbox for each of the tables to isplay the results from that table. These list boxes work well, but they are now cluttering the screen.
2
5558
by: dlevene | last post by:
Hi - newbie here, be gentle. In Access 2003, I've created a report (based on a query) to produce mailing labels for all records where = "Community". is a combo-box field with the values coming from a seperate table. Problem is, some of these don't have addresses (ie. , and are null). So I want to use the address of the Administrator for that community. This information is in records where = "Administrator" and = whatever the community...
0
8375
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.