Have you looked at the functionality of dlookup?
I want to throw a popup and set a property when a condition is met during data entry. BUT, the Q_Truck_Types from the SQL statement is blank?
What I am expecting is, if my RS (recordset) equals Me.TRUCK_TYPE then popup and set the REASON_CODE.... Or is this not how to use a recordset??? Or maybe something else is way off!
Private Sub UNIT_COMBO_ID_AfterUpdate()
Dim RS As DAO.Recordset
Set RS = CurrentDb.OpenRecordset("SELECT MyTruckTypes FROM TRUCK_TYPE")
If Me.UNIT_COMBO_ID > 0 Then
Me.TRUCK_TYPE = [UNIT_COMBO_ID].[Column](5)
If IsNull(Me![UNIT_COMBO_ID]) Then
&nbs! p; MsgBox "Not a valid Unit ID!", vbOKOnly, "Invalid UNIT Criteria!"
If RS.EOF = Me.TRUCK_TYPE Then
MsgBox ("FIXED MASTER, Reason Code set to 'Work Order Variance'")
Me.REASON_CODE = "Work Order Variance"
Set RS = Nothing
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (2)|