[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Not Reading information from generated form

Posted on 2006-06-22
1
Medium Priority
?
171 Views
Last Modified: 2010-04-30
Dear Experts

I Have a problem its says frmProducts there are no items in the form when there is

The code I am using to generate the form is

Private Sub CmdSelectProducts_Click()

Dim frmProduct As frmProducts
Set frm = frmProducts

frmProducts.Caption = Screen.ActiveForm.Caption

frmProducts.Show

End Sub

This is the code for transfering the information from frmProducts to frmRemoveItem
 
For x = 1 To frmProducts.lstBill.ListItems.Count
    Set litem = FrmRemoveItem.lstBill.ListItems.Add(, , frmProducts.lstBill.ListItems.Item(x))
    litem.SubItems(1) = frmProducts.lstBill.ListItems.Item(x).SubItems(1) ' col2
    litem.SubItems(2) = frmProducts.lstBill.ListItems.Item(x).SubItems(2) ' col3
    litem.SubItems(3) = frmProducts.lstBill.ListItems.Item(x).SubItems(3) ' col4
    litem.SubItems(4) = frmProducts.lstBill.ListItems.Item(x).SubItems(4) ' col5
Next x

Please Help

Nothern_Lights
0
Comment
Question by:Nothern_Lights
1 Comment
 
LVL 9

Accepted Solution

by:
justchat_1 earned 1500 total points
ID: 16971811
the code:
Dim frmProduct As frmProducts
Set frm = frmProducts

should be:
Dim frmProduct As frmProducts
Set frmProduct = new frmProducts
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question