472,958 Members | 1,731 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Put data into subform with click on List Box items

58 32bit
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

✓ answered by NeoPa

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.

8 3484
isladogs
443 Expert Mod 256MB
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,547 Expert Mod 16PB
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 32bit
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,547 Expert Mod 16PB
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 32bit
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, 188 views)
Mar 13 '21 #6
NeoPa
32,547 Expert Mod 16PB
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 32bit
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
443 Expert Mod 256MB
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
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
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
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
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
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
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
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
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
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
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
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.