Nancy Lytle
nancy.lytle at auatac.com
Fri Jul 11 19:26:21 CDT 2003
Now I see what you mean, yes it looks like the formatting got changed around. The line ends with ('". Nancy Drew Wutka <DWUTKA at marlow.com> said: > This message is in MIME format. Since your mail reader does not understand > this format, some or all of this message may not be legible. > > ------_=_NextPart_001_01C347EC.4B7441B0 > Content-Type: text/plain; > charset="iso-8859-1" > > I realize you have an If then, I am going to bold what I am talking about, > so I'll convert this email to HTML format. > > > If bolUSERLOG = False Then > > strSQLInsert = "insert into tblUserLog(UserName, UserGroup, UserEnter) > > values > > ('" > > strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup & "', > #" > > > > & Now() & "#)" > > MsgBox strSQLInsert > > Else > > strSQLInsert = "insert into tblUserLog(UserName, UserGroup, UserExit) > values > > > > ('" > > strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup & "', > #" > > > > & Now() & "#)" > > MsgBox strSQLInsert > > End If > > > Those two lines, I don't understand why you have them written like that. Do > you have line continuations that I don't see, or is the formatting of the > email just pushing the lines around? > > > Drew > > > -----Original Message----- > From: Nancy Lytle [ mailto:nancy.lytle at auatac.com > <mailto:nancy.lytle at auatac.com> ] > Sent: Friday, July 11, 2003 2:59 PM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Function User Log error > > > > I'm not sure what you mean. I am building the insert string twice, once to > insert into "Enter" if the boolean value is one value or else into "Exit" if > it is not, so the same function logs the user in or out depending on the > flag. > > Nancy > > Drew Wutka <DWUTKA at marlow.com> said: > > > Why is this in the code twice? > > > > 'strSQLInsert = strSQLInsert & fcnOSUserName' > > > > You are saying ""="" & Username > > > > Why? > > > > just replace that string with fcnOSUserName, see if that makes a > difference. > > > > Drew > > > > Any ideas welcome, > > TIA > > Nancy Lytle > > > > CODE: > > Option Compare Database > > Option Explicit > > Public bolUSERLOG As Boolean 'enter exit flag > > > > Public Function fcnLogUser() > > Call fcnOSUserName > > Call fcnUserGroup > > Dim strSQLInsert As String > > MsgBox "User entering/exiting" > > 'DoCmd.SetWarnings False > > If bolUSERLOG = False Then > > strSQLInsert = "insert into tblUserLog(UserName, UserGroup, UserEnter) > > values > > ('" > > strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup & "', > #" > > > > & Now() & "#)" > > MsgBox strSQLInsert > > Else > > strSQLInsert = "insert into tblUserLog(UserName, UserGroup, UserExit) > values > > > > ('" > > strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup & "', > #" > > > > & Now() & "#)" > > MsgBox strSQLInsert > > End If > > DoCmd.RunSQL strSQLInsert > > 'DoCmd.SetWarnings True > > End Function > > > > -- > > Nancy Lytle > > EIS > > nancy.lytle at auatac.com > > > > > > > > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > <http://databaseadvisors.com/mailman/listinfo/accessd> > > Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com> > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > <http://databaseadvisors.com/mailman/listinfo/accessd> > > Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com> > > > > > > > -- > Nancy Lytle > EIS > nancy.lytle at auatac.com > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > <http://databaseadvisors.com/mailman/listinfo/accessd> > Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com> > > > > ------_=_NextPart_001_01C347EC.4B7441B0 > Content-Type: text/html; > charset="iso-8859-1" > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> > <TITLE></TITLE> > > <META content="MSHTML 6.00.2722.900" name=GENERATOR></HEAD> > <BODY> > <P><FONT size=2>I realize you have an If then, I am going to bold what I am > talking about, so I'll convert this email to HTML format.<BR><BR>> If > bolUSERLOG = False Then<BR>> strSQLInsert = "insert into tblUserLog (UserName, > UserGroup, UserEnter)<BR>> values<BR>> ('"<BR>> <STRONG><U>strSQLInsert > = strSQLInsert & fcnOSUserName</U></STRONG> & "', '" & fcnUserGroup > & "', #"<BR>><BR>> & Now() & "#)"<BR>> MsgBox > strSQLInsert<BR>> Else<BR>> strSQLInsert = "insert into > tblUserLog(UserName, UserGroup, UserExit) values<BR>><BR>> ('"<BR>> > <STRONG><U>strSQLInsert = strSQLInsert & fcnOSUserName</U></STRONG> & > "', '" & fcnUserGroup & "', #"<BR>><BR>> & Now() & > "#)"<BR>> MsgBox strSQLInsert<BR>> End If<BR></FONT></P> > <P><FONT size=2>Those two lines, I don't understand why you have them written > like that. Do you have line continuations that I don't see, or is the > formatting of the email just pushing the lines around?</FONT></P> > <DIV><FONT size=2></FONT> </DIV> > <DIV><FONT size=2><FONT face=Arial color=#0000ff>Drew</FONT></DIV> > <P><BR>-----Original Message-----<BR>From: Nancy Lytle [<A > href="mailto:nancy.lytle at auatac.com">mailto:nancy.lytle at auatac.com</A>] <BR>Sent: > Friday, July 11, 2003 2:59 PM<BR>To: Access Developers discussion and problem > solving<BR>Subject: RE: [AccessD] Function User Log error<BR><BR><BR><BR>I'm not > sure what you mean. I am building the insert string twice, once > to<BR>insert into "Enter" if the boolean value is one value or else into "Exit" > if<BR>it is not, so the same function logs the user in or out depending on the > flag.<BR><BR>Nancy<BR><BR>Drew Wutka <DWUTKA at marlow.com> said:<BR><BR>> > Why is this in the code twice?<BR>><BR>> 'strSQLInsert = strSQLInsert > & fcnOSUserName'<BR>><BR>> You are saying ""="" & > Username<BR>><BR>> Why?<BR>><BR>> just replace that string with > fcnOSUserName, see if that makes a difference.<BR>><BR>> > Drew<BR>><BR>> Any ideas welcome,<BR>> TIA<BR>> Nancy > Lytle<BR>><BR>> CODE:<BR>> Option Compare Database<BR>> Option > Explicit<BR>> Public bolUSERLOG As Boolean 'enter exit > flag<BR>><BR>> Public Function fcnLogUser()<BR>> Call > fcnOSUserName<BR>> Call fcnUserGroup<BR>> Dim strSQLInsert As > String<BR>> MsgBox "User entering/exiting"<BR>> 'DoCmd.SetWarnings > False<BR>> If bolUSERLOG = False Then<BR>> strSQLInsert = "insert into > tblUserLog(UserName, UserGroup, UserEnter)<BR>> values<BR>> ('"<BR>> > strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup > & "', #"<BR>><BR>> & Now() & "#)"<BR>> MsgBox > strSQLInsert<BR>> Else<BR>> strSQLInsert = "insert into > tblUserLog(UserName, UserGroup, UserExit) values<BR>><BR>> ('"<BR>> > strSQLInsert = strSQLInsert & fcnOSUserName & "', '" & fcnUserGroup > & "', #"<BR>><BR>> & Now() & "#)"<BR>> MsgBox > strSQLInsert<BR>> End If<BR>> DoCmd.RunSQL strSQLInsert<BR>> > 'DoCmd.SetWarnings True<BR>> End Function<BR>><BR>> --<BR>> Nancy > Lytle<BR>> EIS<BR>> > nancy.lytle at auatac.com<BR>><BR>><BR>><BR>><BR>> > _______________________________________________<BR>> AccessD mailing > list<BR>> AccessD at databaseadvisors.com<BR>> <A > href="http://databaseadvisors.com/mailman/listinfo/accessd" > target=_blank>http://databaseadvisors.com/mailman/listinfo/accessd</A><BR>> > Website: <A href="http://www.databaseadvisors.com" > target=_blank>http://www.databaseadvisors.com</A><BR>> > _______________________________________________<BR>> AccessD mailing > list<BR>> AccessD at databaseadvisors.com<BR>> <A > href="http://databaseadvisors.com/mailman/listinfo/accessd" > target=_blank>http://databaseadvisors.com/mailman/listinfo/accessd</A><BR>> > Website: <A href="http://www.databaseadvisors.com" > target=_blank>http://www.databaseadvisors.com</A><BR>><BR><BR><BR><BR>-- <BR>Nancy > Lytle<BR>EIS<BR>nancy.lytle at auatac.com<BR><BR><BR><BR>________________________ _______________________<BR>AccessD > mailing list<BR>AccessD at databaseadvisors.com<BR><A > href="http://databaseadvisors.com/mailman/listinfo/accessd" > target=_blank>http://databaseadvisors.com/mailman/listinfo/accessd</A><BR>Webs ite: > <A href="http://www.databaseadvisors.com" > target=_blank>http://www.databaseadvisors.com</A><BR></P></FONT></BODY></HTML> > > ------_=_NextPart_001_01C347EC.4B7441B0-- > -- Nancy Lytle EIS nancy.lytle at auatac.com