473,508 Members | 2,233 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!PurchaseForm.ItemName = me.ItemBox.Column(1)

but its not working
Mar 9 '21 #1
8 3522
isladogs
457 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,557 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.Column(1)
docmd.gotorecord , , acNewRecord

but unfortunately this not work too
Mar 11 '21 #4
NeoPa
32,557 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, 208 views)
Mar 13 '21 #6
NeoPa
32,557 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
457 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
6811
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...
2
3044
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...
2
5745
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...
0
1681
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...
4
2416
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....
4
3021
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
2170
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
2021
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....
1
1429
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,...
1
2316
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...
0
7225
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,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7383
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...
1
7046
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...
1
5053
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...
0
3194
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
418
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...

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.