I made encounter a primary key and my checkmarks became editable. What was
It's no secret. You've had the right answer for hours but you ignored it.
It's right here:
http://www.microsoft.com/office/com...ries&mid=f8f9a8d5-057d-4aef-bb85-c95cac28fcd0
It reads:
"That 'one record in the main database' is the record in the table on the
'one' side of the relationship. This table needs to have either a primary
key on the customer number field or else a unique index that is required and
doesn't allow NULL's. The customer number field in the other table, the
"many" side, needs to have that field required and not allow NULL's, either.
That way, your query will be updateable and you'll be able to use it as the
Record Source Property for a form that displays the data for you to mark
those check boxes."
I asked you for the SQL statement so that we could tell you exactly what
fields and tables needed changes. Since you didn't offer the SQL statement
till much later, I had to identify the table name at the time by what you had
called it, "one record in the main database," and the field that linked the
two tables together, "customer number."
The more vague the information you give, the longer it will take to help you
because we can't see your database nor the names. When we used the exact
same terminology that you did, you didn't understand the table name Billing
was actually what you had called "one record in the main database," and the
Encouter field in the Billing table was actually what you had called
"customer field," and MR in the Billing_enc table was what you had called
"customer field" that it linked to.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
alexasha said:
Brilliant,
I made encounter a primary key and my checkmarks became editable. What was
the secret?
Thank you for your help
Duane Hookom said:
And "the primary/foreign key relationship"? Is Encouter the primary key in
the Billing table? If it isn't, what happens when you make it the primary
key?
--
Duane Hookom
MS Access MVP
alexasha said:
SELECT Billing.Floor, Billing.Room, Billing.Name, Billing.MR,
Billing.Hostipal, Billing.[Admit date], Billing.Encouter,
Billing.Diagnosis,
Billing.D_C, Billing_enc.Date, Billing_enc.Charge, Billing_enc.[Complete
Bill
1], Billing.Complete
FROM Billing INNER JOIN Billing_enc ON Billing.Encouter = Billing_enc.MR
WHERE (((Billing.Hostipal)=[Hospital]) AND ((Billing.D_C)=-1));
Billing is main table linked to Billin_enc. The field Encounter in Billing
is linked to MR in billing_enc. Again this is done this way because of
original database in Handbase.
Billing.Complete is my checkmark that I would like to be able to edit and
it
is located in Billing table. Billing_enc[Complete Bill 1] is another
checkmark, but now in billing_enc table. I can not edit either, but just
need
to use one. I have created checkmarks in both tables for troubleshooting.
WHERE (((Billing.Hostipal)=[Hospital]) AND ((Billing.D_C)=-1));
Query is filtered by hospital and by patients that were discharged
(checkmark checked in Billing database)
:
Open the query in Design mode, then under View in the menu select SQL
View.
Copy and paste the SQL code to a reply here. You can also just describe
the
primary keys and relationships.
Randall Arnold