Hi Guys
I have form which displays information for 4 different tables, It is actually based on a query.
I have Tab Control in my form, for each Item in the form I have 2 tabs.
Tab1 shows detail-1, tab2 shows detail2.
I want to be able to delete detail-1 or detail-2 for each item, or add a new detail.
Can any one help?????
THanks
8 1507 NeoPa 32,557
Recognized Expert Moderator MVP
I have Tab Control in my form, for each Item in the form I have 2 tabs.
Tab1 shows detail-1, tab2 shows detail2.
I have no idea what you're referring to here.
What does 'each item' mean?
Can you make your question clearer so that someone can give you an answer.
I have no idea what you're referring to here.
What does 'each item' mean?
Can you make your question clearer so that someone can give you an answer.
By item i meant application.
For each application I have 2 TabControl (2 windows) called Server and Contacts.
In Tab Server I have displayed Server (where application is located), Server Description and the location of server.
In tab Contacts, I have displayed information like department and contact details for that application, (information of the person to contact to when an application is broken or needs to be updated)
Now the location of the application (the server it was located in) has changed and also the department and the contact details has changed too therefore I need to delete them of the table and insert a new information instead.
I have 2 buttons "Delete" and "Add New" in each of the window (Tab) which should perform delete and insert operation on the tables.
I need help performing these operations.
I hope this is clear enough.
Thanks
By item i meant application.
For each application I have 2 TabControl (2 windows) called Server and Contacts.
In Tab Server I have displayed Server (where application is located), Server Description and the location of server.
In tab Contacts, I have displayed information like department and contact details for that application, (information of the person to contact to when an application is broken or needs to be updated)
Now the location of the application (the server it was located in) has changed and also the department and the contact details has changed too therefore I need to delete them of the table and insert a new information instead.
I have 2 buttons "Delete" and "Add New" in each of the window (Tab) which should perform delete and insert operation on the tables.
I need help performing these operations.
I hope this is clear enough.
Thanks
I have send this email a while ago and still didn't have any response.
I just want to know how to Insert or delete from a table using SQL statment in VBA.
MMcCarthy 14,534
Recognized Expert Moderator MVP
I have send this email a while ago and still didn't have any response.
I just want to know how to Insert or delete from a table using SQL statment in VBA.
OK Tara
Basic syntax ... -
Dim strSQL As String
-
-
' To delete a record
-
strSQL = "DELETE * FROM TableName WHERE [ID Field]=" & Me.[ID Field]
-
DoCmd.RunSQL strSQL
-
-
' To insert a record
-
strSQL = "INSERT INTO TableName (Field1, Field2, Field3) " & _
-
"VALUES (" & Me.textbox1 & ", " & Me.textbox2 & ", " & Me.textbox3 & ");"
-
Mary
NeoPa 32,557
Recognized Expert Moderator MVP
I have send this email a while ago and still didn't have any response.
I just want to know how to Insert or delete from a table using SQL statment in VBA.
Tara,
Two things :
1. Please don't complain about any delays in responding to posts. We have a bunch of experts on here who choose to spend their time helping you and others like you in their free time. It is entirely inappropriate for you or anyone else to complain that they are not quick enough or even, if I'm to be honest, that they may choose not to respond to any individual request at all. As helpers I am happy for any of them to make that choice. They very rarely do thank goodness (if you look at some of the post times you'll see that great efforts are made already just to keep up with as much as possible).
(Moderator hat on).
2. If you tell me which version of Access you are running I will tell you how to find some very interesting information on SQL commands that are usually difficult to find when going the normal ways through help. I've had to do it for '97 through 2K3 and managed to get there on all so far, but sometimes after a lot of very counter-intuitive searching.
Tara,
Two things :
1. Please don't complain about any delays in responding to posts. We have a bunch of experts on here who choose to spend their time helping you and others like you in their free time. It is entirely inappropriate for you or anyone else to complain that they are not quick enough or even, if I'm to be honest, that they may choose not to respond to any individual request at all. As helpers I am happy for any of them to make that choice. They very rarely do thank goodness (if you look at some of the post times you'll see that great efforts are made already just to keep up with as much as possible).
(Moderator hat on).
2. If you tell me which version of Access you are running I will tell you how to find some very interesting information on SQL commands that are usually difficult to find when going the normal ways through help. I've had to do it for '97 through 2K3 and managed to get there on all so far, but sometimes after a lot of very counter-intuitive searching.
Hi NeoPa
Thanks for raising this point and please don’t get me wrong, I am not complaining at all. I am thankful and I really do appreciate the efforts that all the experts make to answer our question.
I am aware that there may me delays or the expert may not even want to answer any question, I understand that completely.
There are many new developers like me who want their questions answered, and because of that the thread may be forgotten.
So instead of creating a new thread for the same question I have just replied to my self to bring it on the top of the list and get attract the experts attention and that was all.
I am running 2002 version of Access at work, and 2003 at home.
Thanks
OK Tara
Basic syntax ... -
Dim strSQL As String
-
-
' To delete a record
-
strSQL = "DELETE * FROM TableName WHERE [ID Field]=" & Me.[ID Field]
-
DoCmd.RunSQL strSQL
-
-
' To insert a record
-
strSQL = "INSERT INTO TableName (Field1, Field2, Field3) " & _
-
"VALUES (" & Me.textbox1 & ", " & Me.textbox2 & ", " & Me.textbox3 & ");"
-
Mary
Thank you Mary
That is all I needed.
NeoPa 32,557
Recognized Expert Moderator MVP
Tara,
Thank you for your reply - very clearly and nicely put.
I have to look out for such things as a moderator as we feel it's important to protect all our experts and make them know we value them all highly :).
I'm not trying to sound grumpy - honest.
In future, just post something like 'Bumping Thread' - that's what we all do when we feel the need (not too many times though).
-Adrian.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Someonekicked |
last post by:
I have a binary file, and I need to delete a specific number of characters
in it.
The file contains records, each record has a specific length.
So the way I wanna handle deleting is that I will...
|
by: Robert Schneider |
last post by:
Hi to all,
I don't understand that: I try to delete a record via JDBC. But I always
get the error SQL7008 with the error code 3. It seems that this has
something to do with journaling, since the...
|
by: Steve |
last post by:
I have several pairs of synchronized subforms in an application. I have a Delete
button for each pair that uses the following code or similar to delete a record
in the second subform:
...
|
by: Uwe Range |
last post by:
Hi to all,
I am displaying a list of records in a subform which is embedded in a
popup main form (in order to ensure that users close the form when
leaving it).
It seems to be impossible to...
|
by: Maria |
last post by:
Is there another way to delete the current record in a subform from the main
form, another subform or a sub-subform other than setting focus on a field
in the subform and using run command...
| |
by: Susan Bricker |
last post by:
I have a command button on a form that is supposed to Delete the record
being displayed. The record is displayed one to a form. The form is
not a Pop-Up nor is it Modal. Tracing the btnDelete...
|
by: Bob Bridges |
last post by:
Start with two tables, parent records in one and child records in the other,
a one-to-many relationship. Create a select statement joining the two.
Display the query in datasheet mode. When I...
|
by: Craggy |
last post by:
Hi,
I am trying to pop up a yes/no message box so that a user can delete a record in a continuous form. The default delete message is a bit sloppy because it seems to move the continuous form to...
|
by: sh26 |
last post by:
I can Add and Delete (A, CName, MX and TXT) Dns records on the Dns Server using C# code. The problem I am having is if someone manaully creates a TXT record on the Dns Server, I cannot delete that...
|
by: beacon |
last post by:
Hi everybody,
This is probably going to sound unorthodox, but I have to log records that are deleted...I know, go figure.
Anyway, I have a form with a (continuous) subform, and on the subform I...
|
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...
| |
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...
|
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...
|
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: 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...
|
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...
|
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...
| |
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...
| |