Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    10

    Unanswered: Parameter Query Wildcard

    Hi,
    Grateful for any help i can get.

    1) I have created a query with the wizard which searches two tables based on what is entered in the parameter pop up dialog box. The problem is that the query will only return a trace if the spelling is 100% correct. For example in the Company table i might have the name Pluck Pluckers. If i enter Pluck, Pluckpluckers or pluckpluk then the query would return empty. I know you can use the operator Like and wildcards but i dont know how to do it in this instance.

    2) I would also like to pick your brains on another problem. Having populated the database i know that you can grant permission to edit and access certain tables and forms but what i currently have a problem with is although you can have permission to edit, it is possible to accidentally erase data. Is there a way that after data is initially saved, then if any further changes are made the user is asked if he really wants to make changes.

    Thanks for any reply

  2. #2
    Join Date
    Dec 2005
    Posts
    10
    I have just worke out the answer to the fist question i asked about.
    I used the following Criteria: Like "*" & [Enter GM First Name] & "*"
    Gratefull for any answers on the second question.
    cheers!

  3. #3
    Join Date
    Feb 2010
    Posts
    15
    You're talking about a BeforeUpdate event I think... the code below will ask if you want to save changes before you move on to a new record.

    Add it to the bottom of the code for the form. There is a button on your toolbar for code when you're in design view of a form.

    Private Sub Form_BeforeUpdate(Cancel As Integer)

    'Provide the user with the option to save/undo
    'changes made to the record in the form

    If MsgBox("Changes have been made to this record." _
    & vbCrLf & vbCrLf & "Do you want to save these changes?" _
    , vbYesNo, "Changes Made...") = vbYes Then
    DoCmd.Save
    Else
    DoCmd****nCommand acCmdUndo
    End If
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •