Joe Hecht
jmhla at earthlink.net
Mon Nov 29 13:38:23 CST 2004
Thanks Bobby, Could not remember the proper way to test is not null. This list take a lot of the pain out of working alone. JOE HECHT LOS ANGELES CA jmhla at earthlink.net -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bobby Heid Sent: Monday, November 29, 2004 11:24 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] what is the right way to write this code I'd write it like: If not isnull(Me.JobTitleID) Then 'If row is blank do nothing Me.cboJob_Title.Value = Me.cboJob_Title.Column(1) 'Display job title End If OR If len("" & Me.JobTitleID)>0 Then 'If row is blank do nothing Me.cboJob_Title.Value = Me.cboJob_Title.Column(1) 'Display job title End If I would personally probably use the first one myself. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Hecht Sent: Monday, November 29, 2004 2:10 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] what is the right way to write this code If Me.JobTitleID Is Null Then 'If row is blank do nothing Else Me.cboJob_Title.Value = Me.cboJob_Title.Column(1) 'Display job title End If Rowsource = SELECT [Job Title].JobTitleID, [Job Title].JobTitle FROM [Job Title] ORDER BY [Job Title].JobTitle; JOE HECHT LOS ANGELES CA jmhla at earthlink.net -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com