Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    rlsublime is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2012
    Posts
    58
    I found a way to do it in the design view of the table by setting the required field to YES under the general tab, but is there a way to change the message that is displayed. there is currently an auto generated message. I wanted to display a more user friendly message such as "Please enter 'FIELD NAME"". Is there a way to possibly recreate this in vba?



    Thanks

  2. #17
    rlsublime is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2012
    Posts
    58
    I think the code below contains an idea of what I am trying to do. I am trying to generate a message box prompting the user to enter a value in the loan number field and to keep displaying the message till the user enters a value in the field and then move on to the rest of the code.
    Hopefully this helps a little in disecting my issue. Thanks for your help.


    Code:
    Private Sub Save_Record_Click()
     
      Dim SQL As String
    Do
      If IsNull(Me![Loan Number]) Then MsgBox "Please Enter Loan Number. This is a required field."
    End If
     
    Loop Until (Me![Loan Number]) = .Value
     
    SQL = "Update Investor_Request set Status = 'Closed' where Loan_Number = " & Me![Loan Number] & _
      " AND status = 'Outstanding'"
     
     
    CurrentDb.Execute SQL, dbFailOnError
     
    On Error GoTo Err_Save_Record_Click
     
     
        DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
     
    Exit_Save_Record_Click:
        Exit Sub
     
    Err_Save_Record_Click:
        MsgBox Err.Description
        Resume Exit_Save_Record_Click
       
    End Sub

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 03-01-2012, 12:59 AM
  2. Match TEXTBOX value with TABLE and then validate?
    By taimysho0 in forum Programming
    Replies: 2
    Last Post: 11-22-2011, 11:25 AM
  3. Replies: 3
    Last Post: 08-05-2011, 08:13 PM
  4. Searching for match in table
    By pdxengruser in forum Queries
    Replies: 1
    Last Post: 08-05-2011, 11:56 AM
  5. Match up table using only a few charecter?
    By bangemd in forum Queries
    Replies: 5
    Last Post: 06-05-2009, 04:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums