recordset defined

newby2VBA

Registered User.
Local time
Today, 02:54
Joined
Feb 6, 2010
Messages
45
I have a tbl with facilities and another table with bed types, each facility has types of beds. I have a contract form with a subform of contracted beds by facility. Right now I dont have the beds linked where if you choose all the bed types for a facility the spinner control would go to 0 in the subform. My spinner control just goes up. Anyone know how to make it go down and stop when the inventory is 0. Is this possible?:confused:
 
That's not helpful. My tables are normalized.
 
I was thinking of using case statement with select queries for the recordset wondering if there is examples out there I can look at. I see this problem like an inventory system when decrementing your form it would show available items on hand.
 
In the event that decrements the spinner you can use:
Code:
If Me.SpinnerControl = 0 Then 
   Me.SpinnerControl = 0
Else
   Me.SpinnerControl = Me.SpinnerControl -1
End If
(untested air code)
 
Right now I dont have the beds linked where if you choose all the bed types for a facility the spinner control would go to 0 in the subform. (emphasis added)
This seems to imply the lack of a primary key to enable the use of either a filter or an SQL query to select the bed types by facility.
 

Users who are viewing this thread

Back
Top Bottom