Solved

Not Reading information from generated form

Posted on 2006-06-22
1
161 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 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now