- Increase transparency
- Onboard new hires faster
- Access from mobile/offline
Public Function F2bCheck() Dim db As DAO.Database Dim rs1 As Recordset Dim rs2 As Recordset Dim SQL1 As String Dim SQL2 As String Dim Action1 As String Dim Action2 As String Set db = CurrentDb SQL1 = "SELECT TICKET#, ACTION FROM Jetbase" Set rs1 = db.OpenRecordset(SQL1) Do Until rs1.EOF SQL2 = "select Ticket#, Buy_Sell from obs_for_comparsion where ticket# = " & rs1!Ticket# & "" Set rs2 = db.OpenRecordset(SQL2) Action1 = rs1!Action Action2 = rs2!Buy_Sell CurrentDb.Execute "update compare Set [Ticket#] = rs1!Ticket#" If Action1 = Action2 Then CurrentDb.Execute "Update Compare Set [Action_Check] = 0 where [Ticket#] = " & rs2!Match_No & "" ElseIf Action1 <> Action2 Then CurrentDb.Execute "Update Compare Set [Action_Check] = 1 where [Ticket#] = " & rs2!Match_No & "" End If rs1.MoveNext Loop End Function
|Dealing with Null in VBA sql statement||9||25|
|How to manage encyps queries mssql when sending conditioning values||10||22|
|MS Access Query Help With Updating Information To Specific IDs Criteria||6||16|
|SQL Error - SQL Statement is not valid. There are no columns detected in the statement.||13||20|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!