when I use the following code: -
Dim stDocName as String
-
stDocName = "DELETE FROM [Tenor Drop Down] WHERE [ID]=" & txtID
-
DoCmd.RunSQL stDocName
-
the whole row will be deleted from the table. I only want the specific record to be deleted - the entry in the row that is in column [Tenor1].
I tried to use -
-
Dim stDocName as String
-
stDocName = "DELETE [Tenor1] FROM [Tenor Drop Down] WHERE [ID]=" & txtID
-
DoCmd.RunSQL stDocName
-
in order to only delete the entry in the row that is in the specific column [Tenor1]. it doesn't work.
Any suggestions, please?
3 1580 iburyak 1,017
Recognized Expert Top Contributor
Try this:
[PHP]stDocName = "UPDATE [Tenor Drop Down] SET [Tenor1] = """" WHERE [ID]=" & txtID
DoCmd.RunSQL stDocName[/PHP]
Thank you very much, Urbanangel! it works. now I only need a way to cut the rest of the entries and paste them on entry higher, so that there is not an empty entry. will I be needing a loop?
NeoPa 32,567
Recognized Expert Moderator MVP
Riun, If you post your table structure and explain what you're trying to do and why, we can look at alternative approaches. What you're suggesting sounds like something you wouldn't want to do in an RDBMS. There is probably a much more straightforward way to handle it but I suspect it will mean rearranging your data structure.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Andrew DeFaria |
last post by:
I created the following .sql file to demonstrate a problem I'm having.
According to the manual:
If |ON DELETE CASCADE| is specified, and a row in the parent table
is deleted, then InnoDB automatically deletes also all those rows in
the child table whose foreign key values are equal to the referenced
key value in the parent row.
However:
|
by: robert |
last post by:
been ruminating on the question (mostly in a 390/v7 context) of
whether, and if so when, a row update becomes an insert/delete.
i assume that there is a threshold on the number of columns of
the table, or perhaps bytes, being updated where the engine just
decides, screw it, i'll just make a new one.
surfed this group and google, but couldn't find anything.
the context: we have some java folk who like to parametize/
|
by: RICHARD BROMBERG |
last post by:
I want to add a command button which will add a record to an Access table.
I would also like to add another command button which will delete a record
from the same table.
I searched Google for ideas how to do this but came up empty.
Any Idea how to do it.
Thanks
|
by: shieldsco |
last post by:
I want to delete a colum in a table using the following sql statement:
ALTER TABLE tblMarketing DROP COLUMN ThisYearMonthEnd10. In addition I only want to delete the column if it meets specific crietria. The crirtria is store in the table below. If the UdateMonth is not null then I want to delete.
FinancilaPeriod Month UdateMonth
ThisYearMonthEnd01 Jan
ThisYearMonthEnd02 Feb
ThisYearMonthEnd03 Mar
ThisYearMonthEnd04 Apr ...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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: 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...
|
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();...
|
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: 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
|
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...
| |