Code: If Me.cboRecentTypes.Value = "Recently Added" Then Me.lboRecent.RowSource = SELECT tblContacts.ContactID, [LastName] & IIf(IsNull([Lastname]),"",", ") & [NamePrefix] & IIf(IsNull([NamePrefix]),""," ") & [FirstName] AS Name, [Title] & IIf(IsNull([Title]),"",", ") & [Business/Organization] AS Business, [Address] & " " & [City] & IIf(IsNull([City]),"",", ") & State & " " & Zip AS Addrss, tblContacts.Phone, tblContacts.DateAdded, tblContacts.DateModified FROM tblContacts WHERE (((tblContacts.DateAdded) Between DateAdd("d",1,Date()) And DateAdd("d",-7,Date()))) ORDER BY DateModified DESC; End If Me.lboRecent.Requery
Public Function CheckForNulls(frm as form) as booleanCould someone look at this to help pinpoint what is wrong?
Dim ctl As Control
Dim intMsgResponse As Integer
' Loop through all the controls on the form
For Each ctl In frm.Controls
' Check the tag property
If ctl.Tag = "RequiredField" Then
' Check this control has a value
If ctl = "" Or IsNull(ctl) Then
' No Value - Cancel the update event
CheckForNulls = True
'Exit loop when an incomplete required field is found
' Check to see if a required field was blank and inform the user
If CheckForNulls = True Then
MsgBox "Please fill in all required fields."
Code: Declare PtrSafe Function aht_apiGetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As BooleanI don't know what I'm doing. Can anyone help?
Code: Dim txtAcc As String txtAcc = SELECT Employees.Access_Level FROM Employees WHERE Employee_ID = XXXXXXXX)help please