Hey man, thanks for the star.
And if you want to keep the paynow box checked for the records that have been paid, just remove the PayNow = 0 from the UPDATE string. I'm not real sure why I originally included that unless it was to ensure that all records were viewable in the query. Removing...
In the test db I did, the requery resorted them, but did not remove them from the table. Instead of changing PAYNOW = -1, my brain (faulty thought it may be) would set it back to 0 and create an on Load event on the form that says "If Not IsNull(DatePaid) Then PayNow.Enabled=False". Or better...
I think this is probably exactly what you are looking for. Good info for parameter queries and dynamic reports.
http://www.fontstuff.com/access/acctut19.htm
Hey Aves -
If I were to do this, I'd use a SQL statement in VBA that would run when an "Update Now" button is clicked. I did a quick test and here is what it looks like.
Private Sub cmdGo_Click()
Dim strSQL As String
strSQL = "UPDATE Repairs SET DatePaid = '" & Me.NewDate.Value & "'...
do you have another field in the query that stores the number of procedures performed? if so, just divide number dead by # of procedures, then set the format to Percent.
PJ
Try this. I just got done calculating percentages on a report of mine.
=(DCount("[Procedure]","tblMyTable","[Survived]=1"))/(DCount("[Procedure]","tblMyTable","[ProcedureID]=243"))
Breakdown:
DCount - counts the number of records in a specific domain (ie table or query)
"[Procedure]" - Field...
Likewise, you can use the RIGHT function to select characters on the right side of your string. This obviously dosen't apply to your situation, but still good to know.
Left(field name or string,#)
Right(field name or string,#)
# equals the number of characters you want to see. So if you want...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.