From: Steve on 8 Dec 2009 15:44 I am trying to create a button on a ClassInput Form (junction form tracking what staff members which courses) to take me to the corresponding record on the EducationCourses Form. It is opening the correct form but taking me to a blank record. I am not sure what my aurguments should be for the GoToRecord action. This is what my macro looks like right now Action Arguments OpenForm - frmEducationOfferings, Form, , [CourseTitle]=[Forms]! [frmEducationOfferings]![CourseTitle],Edit, Normal GoToRecord - NOT SURE WHAT TO PUT HERE
From: Dale Fye on 10 Dec 2009 08:21 I would not use the GoToRecord at all. The command button should call the OpenForm method and pass a criteria which filters the form for the appropriate class. It should look something like: Private Sub cmd_EdCourse_Click Dim strCriteria strCriteria = "[CourseTitle] = """ & me.CourseTitle & """" Docmd.OpenForm "frmEdCourses",acNormal,,strCriteria,,acDialog End Sub This should work, although I prefer to use the CourseID (since most people rarely index text fields and indexed searches run quicker). ---- HTH Dale "Steve" wrote: > I am trying to create a button on a ClassInput Form (junction form > tracking what staff members which courses) to take me to the > corresponding record on the EducationCourses Form. It is opening the > correct form but taking me to a blank record. I am not sure what my > aurguments should be for the GoToRecord action. This is what my macro > looks like right now > > Action Arguments > OpenForm - frmEducationOfferings, Form, , [CourseTitle]=[Forms]! > [frmEducationOfferings]![CourseTitle],Edit, > Normal > GoToRecord - NOT SURE WHAT TO PUT HERE > . >
From: Steve on 11 Dec 2009 15:04 On Dec 10, 8:21 am, Dale Fye <dale....(a)nospam.com> wrote: > I would not use the GoToRecord at all. > > The command button should call the OpenForm method and pass a criteria which > filters the form for the appropriate class. It should look something like: > > Private Sub cmd_EdCourse_Click > > Dim strCriteria > > strCriteria = "[CourseTitle] = """ & me.CourseTitle & """" > Docmd.OpenForm "frmEdCourses",acNormal,,strCriteria,,acDialog > > End Sub > > This should work, although I prefer to use the CourseID (since most people > rarely index text fields and indexed searches run quicker). > > ---- > HTH > Dale > > > > "Steve" wrote: > > I am trying to create a button on a ClassInput Form (junction form > > tracking what staff members which courses) to take me to the > > corresponding record on the EducationCourses Form. It is opening the > > correct form but taking me to a blank record. I am not sure what my > > aurguments should be for the GoToRecord action. This is what my macro > > looks like right now > > > Action Arguments > > OpenForm - frmEducationOfferings, Form, , [CourseTitle]=[Forms]! > > [frmEducationOfferings]![CourseTitle],Edit, > > Normal > > GoToRecord - NOT SURE WHAT TO PUT HERE > > .- Hide quoted text - > > - Show quoted text - Thanks Dale I appreciated it. I figured out what I was doing wrong. I had my criteria formula inverted. The left side of the equal sign is suposed to be field and the table I am going to and the right the information from the field I am referencing in the current form. Don't ask me how I figured that out because I couldn't tell you. But it is working now and that is all that maters. Thanks so much!
|
Pages: 1 Prev: Query/Report based on Employee Hire Date Next: Newbee need help with PDF |