Hellol,
I'm again in need of your help with my Order processing system..
My Order form is based on (query) of Customer and Order tables (includes a subform for the product data)...has a listbox (values are check or credit card)...to store the payment type. What I'm looking for is a way to pop up a form based off either a credit card or a check selection. Either form would then store their data into the Payments table (used for report processing) i.e, paymentID, cardholder's name, exp date, last 4 digits of card, routing number, etc.........
I would actually like to have a textbox (for storing the check number/routing number)....Possibly have it be not active until the check selection is made in the listbox; then for a credit card selection, a small form to popup for additional information.
Help, does anyone understand what I'm trying to do and better yet, if someone has done this, could you point me to a sample form (similar)??? thanks so much, in advance.
Rosie
7 3362
Hellol,
I'm again in need of your help with my Order processing system..
My Order form is based on (query) of Customer and Order tables (includes a subform for the product data)...has a listbox (values are check or credit card)...to store the payment type. What I'm looking for is a way to pop up a form based off either a credit card or a check selection. Either form would then store their data into the Payments table (used for report processing) i.e, paymentID, cardholder's name, exp date, last 4 digits of card, routing number, etc.........
I would actually like to have a textbox (for storing the check number/routing number)....Possibly have it be not active until the check selection is made in the listbox; then for a credit card selection, a small form to popup for additional information.
Help, does anyone understand what I'm trying to do and better yet, if someone has done this, could you point me to a sample form (similar)??? thanks so much, in advance.
Rosie
Hello Rosie!
Is your request to open 2 different Forms based on whether the selection in a List Box is either Check or Credit Card? If this is not the case, please provide additional information, if it is, please provide the Name of the List Box as well as the Names of the Forms and I'll get back to you.
Hello Rosie!
Is your request to open 2 different Forms based on whether the selection in a List Box is either Check or Credit Card? If this is not the case, please provide additional information, if it is, please provide the Name of the List Box as well as the Names of the Forms and I'll get back to you.
Hi ADezii,
Yes, you got it. They're two different forms gathering different info (but each will store into the Payments table). The listbox is called 'paymnt'.
I'm thinking of putting this behind a cmd button... - If Me.MyListBox.Value = 1 Then
-
DoCmd.OpenForm "Form1"
-
Else
-
DoCmd.OpenForm "Form2"
-
End If
-
Do you have any suggestions better than this? thanks
Rosie
Hi ADezii,
Yes, you got it. They're two different forms gathering different info (but each will store into the Payments table). The listbox is called 'paymnt'.
I'm thinking of putting this behind a cmd button... - If Me.MyListBox.Value = 1 Then
-
DoCmd.OpenForm "Form1"
-
Else
-
DoCmd.OpenForm "Form2"
-
End If
-
Do you have any suggestions better than this? thanks
Rosie
Place either 1 of the following code blocks in the AfterDate() Event of the List Box. Which block you use depends on whether the List Box contains 1 or 2 Columns: -
Private Sub paymnt_AfterUpdate()
-
'For a Single Column List Box
-
Select Case Me![paymnt]
-
Case "Check"
-
DoCmd.OpenForm "Form1"
-
Case "Credit Card"
-
DoCmd.OpenForm "Form2"
-
Case Else
-
End Select
-
-
'For a 2 Column List Box (1st Key Column hidden)
-
Select Case Me![paymnt].Column(1)
-
Case "Check"
-
DoCmd.OpenForm "Form1"
-
Case "Credit Card"
-
DoCmd.OpenForm "Form2"
-
Case Else
-
End Select
-
End Sub
-
Place either 1 of the following code blocks in the AfterDate() Event of the List Box. Which block you use depends on whether the List Box contains 1 or 2 Columns: -
Private Sub paymnt_AfterUpdate()
-
'For a Single Column List Box
-
Select Case Me![paymnt]
-
Case "Check"
-
DoCmd.OpenForm "Form1"
-
Case "Credit Card"
-
DoCmd.OpenForm "Form2"
-
Case Else
-
End Select
-
-
'For a 2 Column List Box (1st Key Column hidden)
-
Select Case Me![paymnt].Column(1)
-
Case "Check"
-
DoCmd.OpenForm "Form1"
-
Case "Credit Card"
-
DoCmd.OpenForm "Form2"
-
Case Else
-
End Select
-
End Sub
-
Thanks so much ADezii,
My listbox has only 1 column. So I'll use the first one..
thanks again,
Rosie
Thanks so much ADezii,
My listbox has only 1 column. So I'll use the first one..
thanks again,
Rosie
Anytime, Rosie. we're always here to help if needed.
Anytime, Rosie. we're always here to help if needed.
ADezii,
The compiler(runtime error) its complaining about the dot{.} or exclamation, or parenthesis in the first line of the Select statement.
I've tried the following:
1.) "Select Case Me.paymnt
2.) "Select Case Me.[paymnt]
any ideas?
Rosie
ADezii,
The compiler(runtime error) its complaining about the dot{.} or exclamation, or parenthesis in the first line of the Select statement.
I've tried the following:
1.) "Select Case Me.paymnt
2.) "Select Case Me.[paymnt]
any ideas?
Rosie
- The code as listed in Post #5 is correct:
-
Select Case Me![paymnt]
-
Case "Check"
-
DoCmd.OpenForm "Form1"
-
Case "Credit Card"
-
DoCmd.OpenForm "Form2"
-
Case Else
-
End Select
-
- Are you executing the code in the AfterUpdate() Event of paymnt?
- Is paymnt the correct Name for the List Box?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: James Goodman |
last post by:
I have a listbox named sub1 on an asp page. I need to fill this list with
values from a table. These are selected based upon the selection of a
value/s in another listbox.
It was suggested that I...
|
by: Andrew |
last post by:
I'm having a major problem with a databound listbox in C#. In the
constructor for the form I am trying to pre-select some of the items based
in information in the database. When I step through the...
|
by: Alpha |
last post by:
I have a listbox with datasource from a dataview. When a user selects a
different item in a combobox then I need to refresh the listbox to the
appropriate listing based on that combobox's selected...
|
by: Chris Leuty |
last post by:
I am populating a multiselect Listbox from a dataset, with the content of
the listbox filled by one table, and the selections determined from another
table. So far, I have been keeping the dataset...
|
by: The Zakman |
last post by:
Please help me with a listbox and postback issue that has me baffled. I am
storing my database connection strings in my web.config. At page_load, the
db strings that are currently stored in the...
|
by: zdrakec |
last post by:
Hello all:
Clearly, I'm not getting it! Here is the scenario:
On a web page, I have two list boxen and a text box. The first listbox
is populated at page load time (if it is not a postback)....
|
by: Randy |
last post by:
Hi,
I'm have a form with a listbox and a few textboxes on it. Based on
the user's selection in the listbox, I want the bindingsource to
update the textboxes with the corresponding values. I have...
|
by: NJonge01 |
last post by:
Great thanks to all the helpful responses I've read! Recently using MS Access after a lengthy (7-10 years) away from the tool. I apologize for posting a question that for all intents & purposes...
|
by: deejayquai |
last post by:
Hello
Simple one this I guess, but I'm quite stuck at the moment.
I would like to update the records displayed in my listbox
(lstStudents) using criteria selected from my combo (cboForm) in a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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...
|
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: 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...
| |