473,889 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with VB Code to open a popup window on the "After Update" event

Del
I have a database that is used to process customer orders. This
databse has numerous tables and forms the table involved in this
question is called tblCustomerMast er. There are two forms in question
one called frmReviewOrder, and the other called frmCreditHold

On the tblCustomerMast er table there is a check box for credit hold.
This is used to signify a customer that is not allowed to order goods
because of some credit issue.

On the frmReviewOrder form there is a drop down combo box for the
Customer's ID number, called CustNbr. Once the user selects the
Customer Number from the drop down I would like Access to look up that
CustNbr at the tblCustomermast er table and if the CreditHold check box
is True them I want the frmCreditHold form to open. If the creditHold
check box is false (not checked) I want Access to continue on (Do
nothing).

Thank you for any assistance!

Regards,
Del
Nov 12 '05 #1
2 2167
Try something like;

Private Sub cboCustomer_Cli ck()
If DLookup("[Credit Hold]","tblCustomerM aster", _
"[Customer ID]='" & cboCustomer & "'") Then
DoCmd.OpenForm "frmCreditHold" , acNormal, , , , acDialog
End If
End Sub
"Del" <dt****@yahoo.c om> wrote in message
news:c2******** *************** ***@posting.goo gle.com...
I have a database that is used to process customer orders. This
databse has numerous tables and forms the table involved in this
question is called tblCustomerMast er. There are two forms in question
one called frmReviewOrder, and the other called frmCreditHold

On the tblCustomerMast er table there is a check box for credit hold.
This is used to signify a customer that is not allowed to order goods
because of some credit issue.

On the frmReviewOrder form there is a drop down combo box for the
Customer's ID number, called CustNbr. Once the user selects the
Customer Number from the drop down I would like Access to look up that
CustNbr at the tblCustomermast er table and if the CreditHold check box
is True them I want the frmCreditHold form to open. If the creditHold
check box is false (not checked) I want Access to continue on (Do
nothing).

Thank you for any assistance!

Regards,
Del


Nov 12 '05 #2
Del
Worked like a champ.

Thank You!!!

Del

"Ruskin" <ru******@nospa m.xtra.com> wrote in message news:<uh******* ************@ne ws.xtra.co.nz>. ..
Try something like;

Private Sub cboCustomer_Cli ck()
If DLookup("[Credit Hold]","tblCustomerM aster", _
"[Customer ID]='" & cboCustomer & "'") Then
DoCmd.OpenForm "frmCreditHold" , acNormal, , , , acDialog
End If
End Sub
"Del" <dt****@yahoo.c om> wrote in message
news:c2******** *************** ***@posting.goo gle.com...
I have a database that is used to process customer orders. This
databse has numerous tables and forms the table involved in this
question is called tblCustomerMast er. There are two forms in question
one called frmReviewOrder, and the other called frmCreditHold

On the tblCustomerMast er table there is a check box for credit hold.
This is used to signify a customer that is not allowed to order goods
because of some credit issue.

On the frmReviewOrder form there is a drop down combo box for the
Customer's ID number, called CustNbr. Once the user selects the
Customer Number from the drop down I would like Access to look up that
CustNbr at the tblCustomermast er table and if the CreditHold check box
is True them I want the frmCreditHold form to open. If the creditHold
check box is false (not checked) I want Access to continue on (Do
nothing).

Thank you for any assistance!

Regards,
Del

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
381
by: Del | last post by:
I have a database that is used to process customer orders. This databse has numerous tables and forms the table involved in this question is called tblCustomerMaster. There are two forms in question one called frmReviewOrder, and the other called frmCreditHold On the tblCustomerMaster table there is a check box for credit hold. This is used to signify a customer that is not allowed to order goods because of some credit issue. On the...
2
9814
by: Mark | last post by:
Hm, I have put a form in Startup... but, forgot to remove docmd.close from it's code. Result... oh it's remarkable. After opening, a database immediately closes!! How to stop it? How to break code? ..what can I do? thanks...
3
3962
by: David | last post by:
Hi I use a calendar to update a field and the after update event no longer works, if i manually update it there is not a problem. How can I get this event to trigger Thanks in advance Dave
3
4939
by: Kevin Pedersen | last post by:
Hello, I am using an editable datagrid. After I save the changes the datagrid shows the old values. I've read the posts about the Page_Load and not binding the datagrid each time. The SQL that is being sent to the database is correct and the changes are eventually being made. If I refresh the page after the update then the new values appear. I noticed that when I put a breakpoint in my update handler everything works fine. When I take...
3
5404
by: Rich | last post by:
Hi there I would like the server to run some code AFTER it has completely rendered the page and sent it to the client - is this possible? Thanks in advance Rich Stone
13
5106
by: Bob Day | last post by:
Using vs2003, vb.net I start a thread, giving it a name before start. Code snippet: 'give each thread a unique name (for later identification) Trunk_Thread.Name = "Trunk_0_Thread" ' allow only 1 thread per line Trunk_Thread.ApartmentState = ApartmentState.STA
4
5650
by: Mikep99 | last post by:
I am new to access and need some help with coding. I have a main form XYZ with 2 subforms. I have a checkbox on subform1 "frmExpediteS" that when checked i would like the Value in Feild "PO" of this subform to appear & populate the feild "PO" in a second subform 2 "frmExpediteDetails". I think I need an after Update event but not sure of the code to use. Can someone please steer me in the right direction. Tks
4
5832
by: injanib via AccessMonster.com | last post by:
I have a combo box called "Recipient" who's row source is a table called "Main" with three columns. The three columns are "Name", "Floor", "Location". Following the combo box are two fields called "Floor" and "Location". The after update event of the combo box runs the following lines to update the next two fields. = Recipient.Column(2) = Recipient.Column(3) The combo box is not limited to the values in its rowsource table. What I
5
2864
by: Zeeshan7 | last post by:
After Update Event Procedure on a form is not working after upsizing database to SQL server. Anything to add in below code as it generate run time error 3622 "You must use the dbSeeChanges option with OpenRecordSet when accessing a SQL Server table that has an IDENTITY column." Please help.. thanks Private Sub Form_AfterUpdate() Dim db As Database Set db = CurrentDb db.Execute "INSERT INTO " & " SELECT * FROM ...
0
9966
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, 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...
0
9810
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,...
0
11199
Oralloy
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...
0
10791
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10894
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,...
0
9610
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, 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...
1
7997
isladogs
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...
0
7150
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();...
1
4647
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 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.