From: Pam on 11 Mar 2010 10:36 Hello, Can someone please tell my why this code will not open the Reminder form when StopTime is blank for the tech selected? It goes straight to the GenInfo form. If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) & _ (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & Forms!fttswitchboard!CboTech & "'" Else DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber End If Thanks in advance. Pam
From: Douglas J. Steele on 11 Mar 2010 10:26 You need to use And, not & If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) And _ (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & Forms!fttswitchboard!CboTech & "'" Else DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber End If -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Pam" <pamnospam(a)deltaprocess.com> wrote in message news:OSfNz2SwKHA.4636(a)TK2MSFTNGP06.phx.gbl... > Hello, > > Can someone please tell my why this code will not open the Reminder form > when StopTime is blank for the tech selected? It goes straight to the > GenInfo form. > > If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) & _ > (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then > DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & > Forms!fttswitchboard!CboTech & "'" > Else > DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber > End If > > Thanks in advance. > Pam >
From: Pam on 11 Mar 2010 12:31 I still can't get it to work as needed. If Tech has time running on job and starts another job, WorkLogReminder should pop-up with open time based on null stop time and tech name on WorkLogHiddenOpen. Sometimes it will pop-up and others it will go right to the GenInfo form with the subform for time entry. The subform for time entry and the hidden open form are both based on the same query. I thought maybe it was an update (requery) issue, but I just closed the db with null stop time and went back in and it went straight to the time entry form - not catching that there was time running on another job. Do you have any suggestions to what I might be doing wrong? Thanks for your help. Pam "Douglas J. Steele" <NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote in message news:On65y8SwKHA.5036(a)TK2MSFTNGP02.phx.gbl... > You need to use And, not & > > If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) And _ > (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then > DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & > Forms!fttswitchboard!CboTech & "'" > Else > DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber > End If > > > -- > Doug Steele, Microsoft Access MVP > http://www.AccessMVP.com/DJSteele > (no e-mails, please!) > > "Pam" <pamnospam(a)deltaprocess.com> wrote in message > news:OSfNz2SwKHA.4636(a)TK2MSFTNGP06.phx.gbl... >> Hello, >> >> Can someone please tell my why this code will not open the Reminder form >> when StopTime is blank for the tech selected? It goes straight to the >> GenInfo form. >> >> If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) & _ >> (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then >> DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & >> Forms!fttswitchboard!CboTech & "'" >> Else >> DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber >> End If >> >> Thanks in advance. >> Pam >> > >
From: Douglas J. Steele on 11 Mar 2010 14:05 Are you certain that Forms!fttWorkLogHiddenOpen!CboTech equals Forms!fttswitchboard!CboTech? With the form open, if you go to the Immediate Window (Ctrl-G), what values do you see? -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Pam" <pamnospam(a)deltaprocess.com> wrote in message news:uf$XF3TwKHA.4908(a)TK2MSFTNGP06.phx.gbl... >I still can't get it to work as needed. If Tech has time running on job >and starts another job, WorkLogReminder should pop-up with open time based >on null stop time and tech name on WorkLogHiddenOpen. Sometimes it will >pop-up and others it will go right to the GenInfo form with the subform for >time entry. The subform for time entry and the hidden open form are both >based on the same query. I thought maybe it was an update (requery) issue, >but I just closed the db with null stop time and went back in and it went >straight to the time entry form - not catching that there was time running >on another job. > > Do you have any suggestions to what I might be doing wrong? > Thanks for your help. > Pam > > > > "Douglas J. Steele" <NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote in message > news:On65y8SwKHA.5036(a)TK2MSFTNGP02.phx.gbl... >> You need to use And, not & >> >> If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) And _ >> (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then >> DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & >> Forms!fttswitchboard!CboTech & "'" >> Else >> DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber >> End If >> >> >> -- >> Doug Steele, Microsoft Access MVP >> http://www.AccessMVP.com/DJSteele >> (no e-mails, please!) >> >> "Pam" <pamnospam(a)deltaprocess.com> wrote in message >> news:OSfNz2SwKHA.4636(a)TK2MSFTNGP06.phx.gbl... >>> Hello, >>> >>> Can someone please tell my why this code will not open the Reminder form >>> when StopTime is blank for the tech selected? It goes straight to the >>> GenInfo form. >>> >>> If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) & _ >>> (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then >>> DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & >>> Forms!fttswitchboard!CboTech & "'" >>> Else >>> DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber >>> End If >>> >>> Thanks in advance. >>> Pam >>> >> >> > >
From: Pam on 11 Mar 2010 14:58 I have the immediate window at the vba code screen and both switchboard and workloghiddenopen are open, but there is nothing in the immediate window. I selected a tech and still nothing. "Douglas J. Steele" <NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote in message news:uoS0g3UwKHA.3564(a)TK2MSFTNGP05.phx.gbl... > Are you certain that Forms!fttWorkLogHiddenOpen!CboTech equals > Forms!fttswitchboard!CboTech? > > With the form open, if you go to the Immediate Window (Ctrl-G), what > values do you see? > > -- > Doug Steele, Microsoft Access MVP > http://www.AccessMVP.com/DJSteele > (no e-mails, please!) > > "Pam" <pamnospam(a)deltaprocess.com> wrote in message > news:uf$XF3TwKHA.4908(a)TK2MSFTNGP06.phx.gbl... >>I still can't get it to work as needed. If Tech has time running on job >>and starts another job, WorkLogReminder should pop-up with open time based >>on null stop time and tech name on WorkLogHiddenOpen. Sometimes it will >>pop-up and others it will go right to the GenInfo form with the subform >>for time entry. The subform for time entry and the hidden open form are >>both based on the same query. I thought maybe it was an update (requery) >>issue, but I just closed the db with null stop time and went back in and >>it went straight to the time entry form - not catching that there was time >>running on another job. >> >> Do you have any suggestions to what I might be doing wrong? >> Thanks for your help. >> Pam >> >> >> >> "Douglas J. Steele" <NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote in message >> news:On65y8SwKHA.5036(a)TK2MSFTNGP02.phx.gbl... >>> You need to use And, not & >>> >>> If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) And _ >>> (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then >>> DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & >>> Forms!fttswitchboard!CboTech & "'" >>> Else >>> DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber >>> End If >>> >>> >>> -- >>> Doug Steele, Microsoft Access MVP >>> http://www.AccessMVP.com/DJSteele >>> (no e-mails, please!) >>> >>> "Pam" <pamnospam(a)deltaprocess.com> wrote in message >>> news:OSfNz2SwKHA.4636(a)TK2MSFTNGP06.phx.gbl... >>>> Hello, >>>> >>>> Can someone please tell my why this code will not open the Reminder >>>> form when StopTime is blank for the tech selected? It goes straight to >>>> the GenInfo form. >>>> >>>> If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) & _ >>>> (Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech >>>> Then >>>> DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" & >>>> Forms!fttswitchboard!CboTech & "'" >>>> Else >>>> DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber >>>> End If >>>> >>>> Thanks in advance. >>>> Pam >>>> >>> >>> >> >> > >
|
Next
|
Last
Pages: 1 2 Prev: Designing forms Next: Synchronize Form and Subforms. Second Subform is the problem. |