Solved

Not Reading information from generated form

Posted on 2006-06-22
1
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
justchat_1 earned 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

724 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