?
Solved

Not Reading information from generated form

Posted on 2006-06-22
1
Medium Priority
?
167 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 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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 Month12 days, 2 hours left to enroll

752 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