Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access General
How will I use the function!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="JOM, post: 939375"] I would like to warn the user that the loan number they entered is already in the database with a messagebox that will indicate which reasons were marked for that when it was entered previously. The reasons are true/false so if a reason is checked, its true. Loan number 00000 has already been entered twice as follows by: Jane 04/04/06 with reason Q1,Q2,Q4 Mary 05/01/06 with reason Q5,Q6 I have the following function to get the true responses....... Function GetTrueResponses(ByVal lLoanID As Long) As String Dim rst As DAO.Recordset Dim dbs As DAO.Database Dim fld As DAO.Field Dim sql As String Dim strOut As String Set dbs = Currentdb() sql = "SELECT Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10 " & _ "FROM tblLoanTable WHERE LoanID = " & lLoanID Set rst = dbs.OpenRecordset(sql,DbOpenSnapshot) If Not rst.Bof and Not rst.Eof Then For Each fld In rst.Fields If fld = true then strOut = strOut & fld.Name & ", " Next Loop If Len(strOut) <> 0 Then strOut = Left(strOut, Len(strOut)-2)) GetTrueResponses = strOut Set rst = Nothihg Set dbs = Nothing End Function [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access General
How will I use the function!
Top