473,661 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Put data into subform with click on List Box items

58 New Member
hi buddies.

i am working on MS Access Purchase system . i made a form with a subform name PurchaseForm contain ID, ItemName, ItemQuantity, ItemPrice, TotalPrice and i made and Item Listbox name ItemBox contain items names.
i want to click the item name in listbox and it fill into subform itemName. as i click the item fill in box and another row made.

how i can do this.

i tried like this on click even on ItemBox like
forms!PurchaseF orm.ItemName = me.ItemBox.Colu mn(1)

but its not working
Mar 9 '21 #1
8 3530
isladogs
459 Recognized Expert Moderator Contributor
Assuming you really do want the second column data from the list box, then possibly this
Expand|Select|Wrap|Line Numbers
  1. Me.PurchaseForm.Form.ItemName = Me.ItemBox.Column(1)
You may find this link useful Reference Controls on subforms
Mar 9 '21 #2
NeoPa
32,568 Recognized Expert Moderator MVP
I would add that it may be very helpful for you to see Forms and Reports as being like windows - I mean the ones with glass you can see through.

None of the lovely scenery outside of your house is contained in the window itself. It merely allows us to see it nicely.

The same is true of Forms and Reports. Certainly, there are trimmings you can add to the window which you'll see every time you look at it but it doesn't store the outside. If you want data to be stored then you have to save it in a table somewhere. When the data's safely in the table it's then visible via your Form or Report.
Mar 10 '21 #3
ZKAHADI
58 New Member
this formula worked but i cant add new item to next row.
i tried like

Me.PurchaseForm .Form.ItemName = Me.ItemBox.Colu mn(1)
docmd.gotorecor d , , acNewRecord

but unfortunately this not work too
Mar 11 '21 #4
NeoPa
32,568 Recognized Expert Moderator MVP
I'm sorry. With so little information in your response I have no idea what you're trying to say.
Mar 12 '21 #5
ZKAHADI
58 New Member
when i click the item listbox to put data into subform it updated but if i again click then new row is not create
the same row data is changing.

Attached Images
File Type: jpg Untitled.jpg (70.3 KB, 210 views)
Mar 13 '21 #6
NeoPa
32,568 Recognized Expert Moderator MVP
I'm still very unclear but perhaps if you tried putting the first line after the second it might work. Again, I have far too little understanding of what you're talking about to be sure, but it might be worth a try.
Mar 13 '21 #7
ZKAHADI
58 New Member
let me explain....

when i click on listbox the item name and price added in subform first row.
if i click again on itembox the item not going add in new row.
it update in old row again.

i want if i click the item name the item add in first row on again click item added in new row same one by one new row made.
Mar 15 '21 #8
isladogs
459 Recognized Expert Moderator Contributor
If I understand you correctly, the first record in the subform will be overwritten because you haven't moved off that before selecting another item from your listbox.
Mar 15 '21 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6827
by: Peter Collinson | last post by:
Hi... Is there any way to style a List Item a different color and size than the <LI> in an Ordered List? I'd like a red super-script number and a dark blue text in a page's footnotes. And this be done using style sheets? -- - Yours truly, Pete Collinson
2
3055
by: Unknown User | last post by:
How can I separate list items displayed inline by vertical bars | ? If I use a background image that simulate a vertical bar, and I put this bg image behind each list item, the last list item will also have a vertical bar to the right, but it shouldn't, because it is the last one. There should be separators only between list items, and not outside the list. How would you do it using CSS? Thanks,
2
5757
by: deepakp | last post by:
Hi, I'm trying to create a site index page. The page layout will consist of a header, left navigation and content display. The left navigation and content display should look like the image file pasted at the bottom of this page http://www.open365test.net/index_test.html I created a stylesheet for the list items as shown at the top of the
0
1692
by: John Dalberg | last post by:
using VS 2005. I have an unordered list with list items which are displayed horizontally. Some of the list items have hyper links and some have checkboxes. The problem is that the checkboxes' labels don't align horizontally with the links. I tried to use style="vertical-align: top" and others in the list item and in the checkbox but they have no effect. ASP.NET creates a span tag around the input tag which doesn't do good. The style...
4
2422
by: colonial | last post by:
I was wondering if what I'm trying to do in Access XP and 2003 is possible. I've looked at countless templates and samples and havn't seen anything like what I want to do to be able to construct it. I've tried manipulating queries, relationships different table joins but to no avail. I'm only a beginner in VBA and know little SQL, I would be truly gratefull if someone can please shed some light on the below. I've been creating a...
4
3027
by: Keith Hughitt | last post by:
For example, If you have a list: <ul> <li>item 1 is short.</li> <li>item 2 is a little bit longer</li> </ul> regardless of the size of the contents of each list item, the element
3
2175
by: stabesh | last post by:
hi I have a problem I want not save data until click 'ok' and Do not save anything when click 'cancel' in form and subform i'm find two file (in attachments) but incorrect please help me
5
2024
by: Jody Bowers | last post by:
I'm using the select tag to populate a dynamic list of work categories from our database. I accomplished this just fine but how do I now make those list items link to the corresponding pages? ie. Click on Accounting and populate a page with only those members in the accounting field. <div id="Categories"><select name="list" size="105"> <?php do { ?> <option value="<?php echo $row_RS_Categories?>"<?php if...
1
1443
by: oanaramonaelena | last post by:
Hi, I want to create a combo box to transfer some items from o list to another list items in the same form and in the same time to actualize two tables: first, from I transfer items and the second, where I transfer items. It is possible? Thank you and my apologize for my grammar.
1
2332
by: ZahsAdict | last post by:
I am a junior developer. I am bit new to C# coding. I am developing a windows application in c# that business wants me to able to sync existing SharePoint List items in the app. I have used the data source connection wizard on the datagridview control to successfully link the sharePoint List. However, when I load the form, I could only see the columns displaying on the datagridview but not the data that currently exist on the sharePoint....
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8758
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1986
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.