This code works. Opens to ContactDetail_frm new record with T1_FirstName_fld with focus.
DoCmd.OpenForm "ContactDetail_frm", acNormal, "", "1=0"
On Error Resume Next
DoCmd.SearchForRecord , "", acFirst, "[ContactID]=" & Nz(DMax("[ContactID]", Form.RecordSource), 0)...
I have a Tab Group on ContactDetail_frm which always opens to tab 0 with focus set to contact search combo box...I can live with this fact, just would of liked it to open from this form when button click with Tab 0 FirstName_fld with focus.
DoCmd.OpenForm "ContactDetail_frm", acNormal, "", "1=0", , acDialog
Forms("ContactDetail_frm").T1_FirstName_fld.SetFocus
Opens to new form, focus not set to FirstName_fld. When I close form I get error "... Cannot find the referenced form 'ContactDetail_frm'."
Contact_frm is a split form with a button "Add Contact" DoCmd.OpenForm "ContactDetail_frm", acNormal, "", "1=0", , acDialog when clicked it opens ContactDetail_frm. In ContactDetail_frm is a Private Sub NewContact_cmd_Click DoCmd.GoToRecord , "", acNewRecDoCmd.GoToControl "FirstName_fld"...
<SOLVED - See Post #20>
I have a form called Contact_frm with a button named NewContact_cmd. I'd like to click the button and open ContactDetail_frm calling a Private Sub NewContact_cmd_Click in ContactDetail_frm.
Form: Contact_frm
Form: ContactDetail_frm
Button: NewContact_cmd
Private...
I downloaded your demo file and have been looking at it. I am not fully understanding what's going on. Could you elaborate a bit on the theory of this approach and how I could implement it?
Found this on answers.microsoft.com
Scottgem
MVP | Volunteer Moderator | Article Author
Replied on May 20, 2018
This is an issue with using Continuous form or datasheet view forms. Those form modes are really ONE set of controls repeated multiple times. So when you change one control it...