Hello All,
Just got a quick query well im hoping it is a quick one!
What i am trying to do is update records with an item table when it is removed. At the moment what is happening is if i have say 10 items and the remove button is pressed it is deleting all the records within that hire , which is fine, I can also get it to update the first item within the listbox. But it does update the other items that were within the listbox.
I know what the problem is, this is what i am using. The findfirst is only finding the first item within the listbox that matches the item table. Is there a way for it to retrieve all the items that are removed? Hope it makes sense - Set rsitemline= currentdatabase.OpenRecordset("select * from itemhire Where itemno =" & Forms!frmitemhire!txtorderno)
-
-
Set rsirtem= currentdatabase.OpenRecordset("tblitem")
-
-
rsirtem.FindFirst ("[itemno]='" & rsitemline("itemno") & "'")
5 1539 NeoPa 32,579
Recognized Expert Moderator MVP
...
Hope it makes sense
...
Not remotely I'm afraid :(
If you try to explain what you mean, by using terms that have no meaning except to you and your project, how can we follow you?
Please try posting this again (in here - assume the first post is not there) but pay particular attention to the logic of someone reading it.
Ok,
I currently have a system which allows hiring of items. When an item is selected this is displayed within a listbox and saved within a table. If i was to press remove then this would clear the listbox, delete from the table and update the hired item within the item table.
Currenttly say i placed an hire order for 10 items, these would all display within a listbox, then if the remove button was to be pressed, all the items would be deleted from the table hireline. This works fine, but at the same time i want to update the stock within the item table. Currently the first item within the listbox updates within the item table but the remanining items do not update.
The code displayed is the code that i am using. Hope this is more clear.. - Set rsitemline= currentdatabase.OpenRecordset("select * from itemhire Where itemno =" & Forms!frmitemhire!txtorderno)
-
-
Set rsirtem= currentdatabase.OpenRecordset("tblitem")
-
-
rsirtem.FindFirst ("[itemno]='" & rsitemline("itemno") & "'")
NeoPa 32,579
Recognized Expert Moderator MVP
You should try reading this and seeing if you can make sense of it.
Nothing is referred. Everything expects the reader to be already aware of the system before they can make sense of it.
Do you not understand that it is your responsibility to make the question readable.
Much as I'd like to, I simply cannot help if I can't understand what you're trying to say.
sorry but my english is not as good....
lets try again.
I have an item table, hire table and item hire table
When an order is placed, the client will select the item and the quantity they require. When selected ok this will display that item within a listbox and into the itemhire table. The quantity they have selected would be decremented from the item table.
If the client then selects another item then the same procedure takes place.
If after say 6 items being ordered they decide to cancel the hire, the delete button would be pressed, this would remove all the items for this order from the itemhire table and update the quantity in the item table.
I can currently get the items to be deleted from the itemhire table that are refereced to this order but cannot get the quantity for the items to be updated within the item table.
Thanks
NeoPa 32,579
Recognized Expert Moderator MVP
Let's see if we can work with this.
I presume you're talking about managing these updates with a form of some kind.
How is the form laid out? Does it use subforms? Does the same form manage adding items as well as removing them - or is this done using a separate form?
What code do you have already on you form for use with adding the items? That may be useful as the reverse is often similar to the original with some changes. We needn't reinvent the wheel if we don't have to.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Donnal Walter |
last post by:
The following method is defined in one of my classes:
def setup(self, items={}):
"""perform setup based on a dictionary of items"""
if 'something' in items:
value = items
# now do something with value
if 'another' in items:
value = items
# do something else with value
|
by: mb |
last post by:
what is the best way to do this:
In a game I want to a class called "Items". This class will have the game
items
public class Items
{
public int Chair
public int Table
. . .and so on . . .
|
by: Alpha |
last post by:
Hi, How can I set all the items in a listbox to be selected? I can't find a
property or mehtod to do it so I thought I'll try using setselected method
but I need to find out how many items are in the listbox.
Thanks,
Alpha
|
by: dave |
last post by:
This little problem is driving me nuts!!
On my webform page I create 2 variables..
Protected p_dml As String = "I"
Public Const mwv_id As Integer = 0
' originally had mwv_id as Protected
|
by: StriderBob |
last post by:
Situation :
FormX is mdi child form containing 2 ListViews
ListView1 contains a list of table names and 4 sub items with data about
each table.
ListView2 contains a list of the columns on each table and 11 sub items with
data about each column.
When a Row in ListView1 is selected the Data in ListVies2 is loaded to show
the correct data. Initially the first row in ListView1 is selected in FormX
load
| |
by: hsuntn |
last post by:
I am grabbing Outlook MailItems using the Items property on my
Outlook inbox. When I iterate through them, I notice that they are
not ordered in ReceivedTime or CreationTime order. For example,
Items.ReceivedTime is April 2005
Items.ReceivedTime is May 2005
Items.ReceivedTime is October 2005
Items.ReceivedTime is June 2005
I did some experiments and the following seems to explain how
|
by: Brian Henry |
last post by:
Since no one else knew how to do this I sat here all morning experimenting
with this and this is what I came up with... Its an example of how to get a
list of items back from a virtual mode list view in .NET 2.0 with multiple
selection turned on... since the .NET documentation is EXTREAML vague on how
to do this and offers no clue on what the virtual mode events do or how to
use them... just thought this might help someone else out...
|
by: Joel Koltner |
last post by:
Is there an easy way to get a list comprehension to produce a flat list of,
say, for each input argument?
E.g., I'd like to do something like:
for x in range(4) ]
....and receive
|
by: PetterL |
last post by:
I writing a program where I read menu items from a file. But I have problem
when I click an menu item i want it to mark that one as checked but I cant
access the menu object of that item to see witch object was selected.
This is the sub procedure that read the items from an Array and create the
menutitem. The array hold more information to use in program when one of the
items is selected.
Dim finisharray(,) As String ' is set up...
|
by: mygirl22 |
last post by:
Hi,
I used this code to created 2 combo boxes General and Specific...and Only show Specific (Combo B) when Combo A is chosen.....
What i need now is to know how to assign specific values to the items in combo b (Specific).???
If i chose a sode, Fanta, i want the total price to be $20.00 (this price will show up in the finial price box....Please Help!!
drinkComboBox.Items.Clear() 'Clears the old items out of the drinkComboBox
...
|
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...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |