Im using this database to keep track of customer information. The form that the following is based on is a change order form. If a customer disconnects his/her phone service the user clicks on a button that populates a new form with the following data.
Our disconnected customers are issed a phone number with a suffix of 9000. Like 898-9001, 9002 etc.
I would like the form to populate the correct field on the new form depending on whether this is a disconnected phone going back into service or not. Below is an example of what I have followed by what I would like to have. Any ideas without changing the whole thing would be greatly appreciated.
Thanks!
Private Sub Duplicate_Enter()
DoCmd.OpenForm "Change Order", acNormal, , , acFormAdd
Forms![Change Order].CRV = Forms![call history data]!NavigationSubform.Form!CRV
Forms![Change Order].[Cable Pair] = Forms![call history data]!NavigationSubform.Form![Cable Pair]
Forms![Change Order].Street = Forms![call history data]!NavigationSubform.Form!Street
Forms![Change Order].[Phy Adrs] = Forms![call history data]!NavigationSubform.Form![Phy Adrs]
Forms![Change Order].Notes = Forms![call history data]!NavigationSubform.Form!Notes
Forms![Change Order].RST = Forms![call history data]!NavigationSubform.Form!RST
Forms![Change Order].[Previous No] = Forms![call history data]!NavigationSubform.Form![Home Phone]
Forms![Change Order].[Lot No] = Forms![call history data]!NavigationSubform.Form![Lot No]
Forms![Change Order].[First Name] = "Quick"
Forms![Change Order].[Last Name] = "Dial Tone"
End Sub
What I need it to create an IF THEN type statement that will allow the previous number to go to a specific location depending on the number.
Example:
If Forms![call history data]!NavigationSubform.Form![Home Phone] is > or =“898-8999” then Forms![Change Order].[Previous No] = Forms![call history data]!NavigationSubform.Form![Home Phone]
Else
Forms![Change Order].[Previous 9000] = Forms![call history data]!NavigationSubform.Form![Home Phone]