vba_php
Forum Troll
- Local time
- Yesterday, 23:49
- Joined
- Oct 6, 2019
- Messages
- 2,880
then you should be able to select more than 2 list items. it doesn't make sense if you can't.there's no difference
then you should be able to select more than 2 list items. it doesn't make sense if you can't.there's no difference
prisescamilla,
You should really take a step back and get your foundation in order. Read up on Db design. Here's one link to get started...https://support.office.com/en-us/article/database-design-basics-eb2159cf-1e30-401a-8084-bd4f9c9ca1f5
Everything starts with your tables. When they are properly designed the rest becomes a lot easier.
then you should be able to select more than 2 list items. it doesn't make sense if you can't.
that's because the code I wrote for you was only meant to be run *once*. the code looks as listbox 1, grabs the items in there and throws them to your PO form (form1). what you're wanting now requires the code to modified because you're searching for 1 material at a time with your search box. I never put any "throw all items" button on a form in my examples. you must have done that yourself? unless you're talking about the button I gave you that throws all the selected items from list 1 to list 2 in form 1? to do what you want now, you would need code that preserves the first "throw" that shows up in the sql statement of list 2 and then "adds" the additional materials you select in your 2nd search to that original sql statement attached to list 2. this is *exactly* why other people here have suggested a redesign. If you keep needing functionality based on what you have, you'll end up with a "spaghetti" program, which is just like the massive Java applet-based program I worked with a decade ago at Pearson Education here in the states. And that didn't result in anything other than people not wanting to work for the company. So you could *possibly* end up in the same boat! So with that being said, anybody that has made the "redesign" suggestion here would serve as an extremely valuable asset to you at this point, if they're willing to take you on that is...i am able to select multiple items however, both items need to be on the same screen at the same time...if i search on an item, click on it, and then search for another item and click on it and then click on the "throw all items" button it only throws the second selection,not the first.
that's because the code I wrote for you was only meant to be run *once*. the code looks as listbox 1, grabs the items in there and throws them to your PO form (form1). what you're wanting now requires the code to modified because you're searching for 1 material at a time with your search box. I never put any "throw all items" button on a form in my examples. you must have done that yourself? unless you're talking about the button I gave you that throws all the selected items from list 1 to list 2 in form 1? to do what you want now, you would need code that preserves the first "throw" that shows up in the sql statement of list 2 and then "adds" the additional materials you select in your 2nd search to that original sql statement attached to list 2. this is *exactly* why other people here have suggested a redesign. If you keep needing functionality based on what you have, you'll end up with a "spaghetti" program, which is just like the massive Java applet-based program I worked with a decade ago at Pearson Education here in the states. And that didn't result in anything other than people not wanting to work for the company. So you could *possibly* end up in the same boat! So with that being said, anybody that has made the "redesign" suggestion here would serve as an extremely valuable asset to you at this point, if they're willing to take you on that is...
not in the slightest, unless you uploaded the full blown database that you're working with. that's impossible without a real-life working replica of what you've got. I could give it a go if you could upload something like that, but if it's too big I personally would request a consulting fee from you or your employer because I only go so far in terms of giving free advice. The knowledge I have is how I make my living. sorry. but if you wanna put something up here, I could tell you for sure if it's small enough to get something for free from me (or other people here).do you by any chance know how I could redesign to fit all my needs?
Did you read the link I posted?can you help me properly design my tables
Did you read the link I posted?
The best way to do this is if you take a stab at it and post back what you come up with. We can then tweak it and guide you in the right direction.
From what you have said so far it sounds like you could start with these tables:
tblSuppliers
SupplierID (PrimaryKey)
SupplierName
More...
tblMaterials
MaterialID (PrimaryKey)
MaterialName
More...
tblAddresses
AddressID (PrimaryKey)
SupplierID (ForeignKey)
Street
City
State
Zip
Suite
AddressType (ie. Mailing,Shipping)
tblContacts
ContactID (PrimaryKey)
SupplierID (ForeignKey)
ContactName
ContactPhone
More...
tblMaterialSuppliers
MaterialSuppliersID (PrimaryKey)
MaterialID (ForeignKey)
SupplierID (ForeignKey)
Price?
More...
tblPurchases
PurchaseID (PrimaryKey)
SupplierID (ForeignKey)
MaterialID (ForeignKey)
PurchaseDate
Quantity
More...
There are a few more but this should give you some ideas. Look at them and see how they are related to one another. Add to them other pieces of info you may want. For instance you mentioned that there may be @ 200 items and you were concerned about a long list. You can get around that by perhaps adding a CategoryID field to the materials table. then a table of Categories like Paper goods, chemicals, cleaning supplies, Safety Items,etc. Then you can have a combox of categories and when you select one you filter your list to just that category.
Post back when you finish your tables.
Thats a start but I'm sure we need more.
Could you describe what your doing a little better in non-database lingo?
There are a lot of contingencies which make a huge difference in how complicated these can get.
We are a _____ Company.
I have ___users.
We order supplies for My company, other companies, customers.
this is to generate a purchase order for my boss to approve and then we send it to the various suppliers, monthly weekly, as needed.
we add items over time and then create the P.O.
The type of things we order are ___.
Do multiple suppliers offer the same Items?
Do you need to specify amounts or quantities?
How often do prices change?
do you just recieve items or do you also ship them?
we need to keep track of exceptions or items not recieved or backordered.
The materials can be categorized by____.
we need to track billing and payments.