473,395 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Delete specific entry in table - only entry in row A column B

34
when I use the following code:

Expand|Select|Wrap|Line Numbers
  1. Dim stDocName as String
  2. stDocName = "DELETE FROM [Tenor Drop Down] WHERE [ID]=" & txtID
  3. DoCmd.RunSQL stDocName
  4.  
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

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim stDocName as String
  3. stDocName = "DELETE [Tenor1] FROM [Tenor Drop Down] WHERE [ID]=" & txtID
  4. DoCmd.RunSQL stDocName
  5.  
in order to only delete the entry in the row that is in the specific column [Tenor1]. it doesn't work.

Any suggestions, please?
Jan 31 '07 #1
3 1570
iburyak
1,017 Expert 512MB
Try this:

[PHP]stDocName = "UPDATE [Tenor Drop Down] SET [Tenor1] = """" WHERE [ID]=" & txtID
DoCmd.RunSQL stDocName[/PHP]
Jan 31 '07 #2
Riun
34
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?
Jan 31 '07 #3
NeoPa
32,556 Expert Mod 16PB
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.
Jan 31 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
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...
16
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...
2
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...
9
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...
0
agi2029
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,...

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.