Hi Everyone,
I'm trying to continue with my rebuild of our call answering screen. it's basically a form with a button for each company we represent, clicking the button will lead to a call answering screen for the company. we also have software that pops the correct screen when we receive a call for the corresponding company.
i'm trying to get some of the fields to autopopulate, starting with the telephone number of the caller. the number appears in a text box on the main form and i'm trying to copy it into the caller telephone box on the call answering form. i've got code in place but it gives me the error "you can't reference a property or method for a control unless the control has the focus". Just wondering if anyone can give me a few pointers to get it working? here's the code for the form i'm working on...
Thanks
Wayne
I'm trying to continue with my rebuild of our call answering screen. it's basically a form with a button for each company we represent, clicking the button will lead to a call answering screen for the company. we also have software that pops the correct screen when we receive a call for the corresponding company.
i'm trying to get some of the fields to autopopulate, starting with the telephone number of the caller. the number appears in a text box on the main form and i'm trying to copy it into the caller telephone box on the call answering form. i've got code in place but it gives me the error "you can't reference a property or method for a control unless the control has the focus". Just wondering if anyone can give me a few pointers to get it working? here's the code for the form i'm working on...
Code:
Option Compare Database
Private Sub cmd_recordcomplete_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close acForm, Me.Name
End Sub
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
txt_dateandtime.Value = Now
Me.txt_callertelephone.Text = Forms!Switchboard!txt_incoming.Text
End Sub
Thanks
Wayne