Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"IF" more than one record

Status
Not open for further replies.

redbay

Technical User
Oct 13, 2003
145
GB
I have 2 tables in my database, tblCustomer and tblAction; both have status fields in them. One customer can have many actions against them. On my Dreamweaver page I have the fields from tblCustomer, including status, but I would like it to show closed when all the actions against the customer are closed, baring in mind that there may be many actions, and open if not all of the actions are closed. In my mind I get something like

If tblAction.Status = Closed Then
tblCustomer.Status = Closed

End If

But how will it know if ALL actions are closed and where would I put the code IF it were correct??
 
Code:
if rsRecordset1.tblAction.Status.Value = "Closed" then
stat = "Closed"

[Peace][Pipe]
 
Its not part of a recordset its an insert form and the code is <input name="Status" type="checkbox" id="Status" value="checkbox">
 
Where are you getting the value of each action from? just the form? If so just write a form validation that will alter a hidden variable for the customer status.

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top