Looping through Form recordset and looking up Value (1 Viewer)

aron.ridgway

Registered User.
Local time
Today, 03:16
Joined
Apr 1, 2014
Messages
148
Hi There, Im still struggling with working with recordsets.

What i want to achieve is to loop through a continuous form recordset, Using the OrderDetailFK from the record set and the OrderDetailPK in the OrderDetail Table

Looking at the Status FK in the OrderDetail Table. IF the OrderDetail Status = 2 then i want to make the textbox enable property = False.

I have made the bellow SQL string which is placing all the criteria i just need to link it into a recordset?

Code:
mySQL = "SELECT [StatusFK] FROM [tblOrderDetail] WHERE [OrderDetailPK] = " & rst!OrderDetailFK & " AND [StatusFK] = 2 "";"""
 

TimW

Registered User.
Local time
Today, 03:16
Joined
Feb 6, 2007
Messages
90
Hi Aron
I am not sure if you can do this with continuous forms as the individual control is visible on all the forms - so if you change a property of one - they all change.

I may be wrong though!!

T
 

BlueIshDan

☠
Local time
Yesterday, 23:16
Joined
May 15, 2014
Messages
1,122
OnRecordChange, Set the Enabled property equal to the records value.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:16
Joined
Aug 30, 2003
Messages
36,139
Try Conditional Formatting; it can do what you're looking for.
 

BlueIshDan

☠
Local time
Yesterday, 23:16
Joined
May 15, 2014
Messages
1,122
Ahh yes, I always forget about the built in features haha :) Thanks pbaldy
 

Users who are viewing this thread

Top Bottom