Advertisement

08.25.2008 at 10:30AM PDT, ID: 23675921
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Microsoft, Access, 2007, VBA - record entry form still adds record when canceled

Asked by greenprg in Access Forms, Access Coding/Macros

Tags: , , , ,

This is driving me bonkers!  I have an Access 2007 database to track engineering requests.  I've completed 3 sections and now the 4th section (other than storing different information, they all function the same) keeps adding extra records even when the entry request is canceled.  When the form opens with blank fields to enter, if I click the Cancel button, the add request cancels fine.  But when the Requestor field is entered, which calculates a request number, then I click Cancel, an empty record is still added with just the request number and requestor info.  The code is EXACTLY the same as 2 other sections of my database and they both work fine.  Did I just get lucky with the other 2 sections?  Please help.

Thanks!
Helen

Here's the code behind the Requestor combo box in the form...
Private Sub Requestor_AfterUpdate()
  Dim tempNo As Integer
  Dim rs As ADODB.Recordset
   
  Set rs = New ADODB.Recordset
   
  tempNo = 1001 + DCount("*", "FiberSimTable")
  Me!FiberSimNum = "FS-" & LTrim(Str(tempNo))
End Sub

Here's the code behind the Cancel button on the form....
Private Sub Cancel_Click()
  Dim intAnswer As Integer

    intAnswer = MsgBox("Are you sure you want to cancel this request?", vbYesNo + vbDefaultButton2)
  If intAnswer = vbYes Then
    DoCmd.Close acForm, "FiberSimEntry"
    DoCmd.OpenForm "FiberSimMenu", acNormal, "", "", acEdit, acNormal
  End If
End Sub
Start Free Trial
 
Loading Advertisement...
 
[+][-]08.25.2008 at 10:48AM PDT, ID: 22307517

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Forms, Access Coding/Macros
Tags: Microsoft, Access, 2007, Forms, VBA
Sign Up Now!
Solution Provided By: peter57r
Participating Experts: 1
Solution Grade: B
 
 
[+][-]08.25.2008 at 11:04AM PDT, ID: 22307644

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628