Advertisement

07.16.2008 at 10:49AM PDT, ID: 23570603
[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.2

Add x records to table

Asked by BobRosas in Access Forms, SQL Query Syntax

Tags: ,

I have a form where the user enters multiple records and since some fields in each record often repeat they asked for a duplicate button.  That part works.  However, now they'd like it to automatically "Duplicate" based on square feet.  Each 100 feet requries a record.  So for 101 sqft I need two records.
1.  They are required to fill in the first record
2.  They enter the square feet
3.  After update on Sq ft I created code that calculates the number of records I need to add.
   If they entered 101 feet I need to add one more record for a total of 2.

Is there a way to call the Duplicate code (from a subform) x times?
Is there a better way to do this?

Here's my Duplicate code

Private Sub cmdDup_Click()
On Error GoTo Err_cmdDup_Click

    strSpotPaintProduct = cboSpotPaintProduct            
    strSpotCoat = cboSpotCoat
    strSpotItemDesc = cboSpotItemDesc
    strSpecifiedDFT = txtSpecifiedDFT
    DoCmd.GoToRecord , , acNewRec                          
    cboSpotPaintProduct = strSpotPaintProduct
    cboSpotCoat = strSpotCoat
    cboSpotItemDesc = strSpotItemDesc
    txtSpecifiedDFT = strSpecifiedDFT
    DoCmd.GoToControl "txtA1"
   
Exit_ccmdDup_Click:
    Exit Sub

Err_cmdDup_Click:
     MsgBox Err.Description
End Sub
 Start Free Trial
[+][-]07.16.2008 at 12:22PM PDT, ID: 22019212

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, SQL Query Syntax
Tags: VBA, Microsoft Access
Sign Up Now!
Solution Provided By: DanielWilson
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.16.2008 at 02:27PM PDT, ID: 22020362

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.

 
[+][-]07.16.2008 at 06:11PM PDT, ID: 22021585

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]07.17.2008 at 09:08AM PDT, ID: 22026996

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 - Hierarchy / EE_QW_2_20070628