473,434 Members | 1,521 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,434 software developers and data experts.

Data entry from an access form to the CUST_PAYMENT table is not hitting my SQL trigge

I have a form called allpayments that allows for data entry to a table called CUST_PAYMENTS. On the form I only have certain fields from the table. PAT_ID, TRNSDT, TRNSCD, AMNT. now in SQl I have a trigger called add_to_total2.

The trigger on insert adds the AMNT to the total payment in another table. My issue is when the users enter data into the table. It is being uploaded to the SQl tables via the ODBC connection, but it is not triggering the trigger. So I need to write a code on a command button on the form that will invoke the trigger in SQL to run. any help.

this is the trigger:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[add_to_total2]
ON [dbo].[CUST_PAYMENT]
AFTER
INSERT
AS UPDATE pat_visit set "Total Payments" = "total payments" + (select amnt from inserted) where
"pat_visit"."Patient ID"= (select PATID from inserted)
Can anyone help me?
May 17 '10 #1
3 1205
ck9663
2,878 Expert 2GB
Is this trigger firing via a manual insert in a Query Window?

~~ CK
May 17 '10 #2
trigger will not fire when data inserted in access but does fire when data entered into SQl table
May 18 '10 #3
ck9663
2,878 Expert 2GB
How are you inserting the record in access? Could you post the T-SQL here?

~~ CK
May 18 '10 #4

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

Similar topics

2
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. ...
3
by: Carmela | last post by:
Hello Readers, I am trying to update data on a form that is based on a query having a many-to-one-to-many relationship. I found this exciting link that seemed to have the solution for me: ...
4
by: Robert | last post by:
Have main form with an unbound subform1 which is used for data entry. Subform1 has a nested continuous unbound subform (subform2) which is used to enter multiple records related to the record being...
2
by: badboybrown | last post by:
Good afternoon, Please can someone tell me the best way of calling up a form that will allow the user to only add new records. I have other forms that will be used to view the existing...
1
by: lesperancer | last post by:
I've got a form that is opened in readonly mode and no fields can be changed, great but if I click on a combo box that has an _enter() event that sets a field on my form to a value (albeit the...
8
by: gracealic | last post by:
I am new to access can someone tell me how do we send the data entered from an inquiry form to a table. say i have a form which has fields client name client address client phone client...
1
by: BlackFireNova | last post by:
I'm using Access 2003, on Windows XP Pro. I have a subform which is launched from a command button on my main form. When this form opens, I have 2 fields which I have inserted VBA Code into to...
13
by: boliches | last post by:
I am trying to alert a user , by using a message box, to state the various missing data.This works OK except when all data is entered as appropriate I still get the "Warning Message" for missing...
7
by: kpresidente | last post by:
Hello all, I'm trying to transfer the value of a control on an Access form to an Excel worksheet using VBA. The Access form is a single form with all the controls disabled, so that data is "read...
0
by: nilanjangm | last post by:
I am using MS Access 2007. I have one of my tables where I store files as "Attachment" datatype against each employee record. Till this point everything is okay. Now, what I want is to display...
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
marktang
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,...
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
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.