If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
text box to update multi fields in table
I have a form with a text box that updates the "Status" field in the table "tCritical" The user is to input either R,G or Y. When the user inputs the R,G or Y I would like the "Phase" field to be updated automatically with the word Entry and the "Area" field to be updated with the word "Sales" (in the tCritical table). How can this be done? Thanks -- deb |
#2
|
|||
|
|||
text box to update multi fields in table
Assuming your form is bound to the tCritical table and the Phase and Area
fields are on the form, then in the after update event of the Status field put IF Status="R" Or Status="G" Or Status="Y" Then Phase = "Entry" Area = "Sales" End If "deb" wrote: I have a form with a text box that updates the "Status" field in the table "tCritical" The user is to input either R,G or Y. When the user inputs the R,G or Y I would like the "Phase" field to be updated automatically with the word Entry and the "Area" field to be updated with the word "Sales" (in the tCritical table). How can this be done? Thanks -- deb |
#3
|
|||
|
|||
text box to update multi fields in table
Create bound controls for Phase and Area on your form. You can hide them by
setting their Visible properties to No. In the After Update event of the Status text box, set their values. You don't say what the values should be if one of the 3 status codes is not entered, so the example below sets them to Null. Private Sub txtStatus_AfterUpdate() With Me If Instr("RGY", .txtStatus) = 0 Then .txtPhase = Null .txtArea = Null Else .txtPhase = "Entry" .txtArea = "Sales" End If End With End Sub -- Dave Hargis, Microsoft Access MVP "deb" wrote: I have a form with a text box that updates the "Status" field in the table "tCritical" The user is to input either R,G or Y. When the user inputs the R,G or Y I would like the "Phase" field to be updated automatically with the word Entry and the "Area" field to be updated with the word "Sales" (in the tCritical table). How can this be done? Thanks -- deb |
Thread Tools | |
Display Modes | |
|
|