473,624 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open form as Data Entry with Customer Info

I am learning with a simple application/form. I am ok - enter customer
name, list box of customers, select a customer, see the items for that
customer.

The items form has customer ID and Name in the header; details on
continuous form in detail.

I want to press a button "Add Garment" and open the customer item form
with the customer ID and Name from the view of the form, but open it as
Data Entry so the user can add garments.

I can't get the Customer ID and Name on the form when I open it for DE.

If this is the wrong design, please advise. I am wondering if it's a
problem that I want to open the same form in DE mode from the form in
view mode.

Here's the code:

Private Sub cmdAddGarment_C lick()
'Once the user found the customer and saw items on file, needs to
add an item
' Open the frmItems in DataEntry mode for this customer

Dim CustID As Long
Dim stDocName As String
Dim First As String
Dim Last As String

Dim stLinkCriteria As String

CustID = Me.CustID
First = Me.FirstName
Last = Me.LastName

stDocName = "frmItems no sub"

stLinkCriteria = "lngCustID = " & CustID & "txtCustome r = " & First
& " " & Last

' Want to open the frmItems to allow Entry
DoCmd.OpenForm stDocName, , , stLinkCtiteria, acFormAdd
Me.DataEntry = True
Me.AllowAdditio ns = True
Me.AllowEdits = True

( I got some hints from these groups - maybe I'm mixing things I
shouldn't?)

thanks
Sara

Nov 13 '05 #1
4 2991
Normal way to do this is to have a table of customers, a table of garments
and a table to join the customer to the garments

You then have a form for the customer, with a list or combo box to get to
the correct customer, and a subform for the garments they have bought. You
simply add a new record on the subform for a new garment. No coding
required.

Phil

"sara" <sa*******@yaho o.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I am learning with a simple application/form. I am ok - enter customer
name, list box of customers, select a customer, see the items for that
customer.

The items form has customer ID and Name in the header; details on
continuous form in detail.

I want to press a button "Add Garment" and open the customer item form
with the customer ID and Name from the view of the form, but open it as
Data Entry so the user can add garments.

I can't get the Customer ID and Name on the form when I open it for DE.

If this is the wrong design, please advise. I am wondering if it's a
problem that I want to open the same form in DE mode from the form in
view mode.

Here's the code:

Private Sub cmdAddGarment_C lick()
'Once the user found the customer and saw items on file, needs to
add an item
' Open the frmItems in DataEntry mode for this customer

Dim CustID As Long
Dim stDocName As String
Dim First As String
Dim Last As String

Dim stLinkCriteria As String

CustID = Me.CustID
First = Me.FirstName
Last = Me.LastName

stDocName = "frmItems no sub"

stLinkCriteria = "lngCustID = " & CustID & "txtCustome r = " & First
& " " & Last

' Want to open the frmItems to allow Entry
DoCmd.OpenForm stDocName, , , stLinkCtiteria, acFormAdd
Me.DataEntry = True
Me.AllowAdditio ns = True
Me.AllowEdits = True

( I got some hints from these groups - maybe I'm mixing things I
shouldn't?)

thanks
Sara

Nov 13 '05 #2
I have those tables, but since there are so many lookups, I thought it
would get confusing for the user to always see drop down boxes. Also,
any typing the user does is automatically changing the data - which is
a problem for a novice user, accidentally typing in the wrong place.

I wanted to have the user see what was on file, and choose "ADD" after
confirming that the garment coming in for tailoring was not already on
file for the customer.

Is my idea totally off? How do you prevent the user from accidentally
over-typing a good record with info for a new record?

(As you can tell, I really AM new!)
Thanks,
Sara

Nov 13 '05 #3
On both the form and the subform there are properties of AllowEdits,
AllowAdditions and AllowDeletions. If you normally have AllowAdditions set
to Yes (True) and the other 2 to No (False) then you could have a button to
change those 2 settings.
Remember though that on the Form.OnOpen and on the Form.OnCurrent to set the
AllowEdits and AllowDeletions back to No

Have fun
Phil
"sara" <sa*******@yaho o.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
I have those tables, but since there are so many lookups, I thought it
would get confusing for the user to always see drop down boxes. Also,
any typing the user does is automatically changing the data - which is
a problem for a novice user, accidentally typing in the wrong place.

I wanted to have the user see what was on file, and choose "ADD" after
confirming that the garment coming in for tailoring was not already on
file for the customer.

Is my idea totally off? How do you prevent the user from accidentally
over-typing a good record with info for a new record?

(As you can tell, I really AM new!)
Thanks,
Sara

Nov 13 '05 #4
OK. A little embarrassing here, but I think what I have to do is
either:
1. Put drop down boxes on the "view" items form and open the form as
data entry when the user presses "Add Garment" button
OR
2. Leave it as it is and create a form frmAddGarment and have that
open when the user presses "Add Garment".

Either way (I've tried both and don't have either working) - one
problem is getting the form to open with the customer name in the
header (txtCustomer). Also, I assume I have to carry over the Customer
ID for the record to be properly written?

Before I go too crazy here, maybe a suggestion on which way to proceed,
so I can work on one solution and ask focused questions on that.

Thanks - really, really!
Sara

Nov 13 '05 #5

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

Similar topics

2
4132
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5 Groups - call them A to E. I'd like to generate a further automatic reference number based on something like Group/Unique ID so when I create a new record Access creates the Unique ID & I then enter in the group and then Access combines the two...
1
293
by: Randy Lucero | last post by:
I have a question for all you experts out there. I have created an Order Entry form that displays a Customer Name from a table called "CustList". That table also contains the usual.. address, city, etc. to include a CustID field. On the Order Entry form, I choose the Customer Name and I am displaying CustID by means of "=txtCustomer.Column(1)" which corosponds with the Customer Name.
1
1979
by: KC | last post by:
I am using Access 2002, with a database template from MS Office. The Orders Management Database. I have tweaked this for use with our company. It is a small database with close to a 1000 records in our Orders table. Within this table are 80 records that I decided to delete to clean it up a bit. When I went into my data entry form, I noticed the bottom portion of the form was blank, this is usually the area that contains each customers...
1
2388
by: KC | last post by:
Hello, I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB. I have tweaked this DB to work for our small co. It has worked pretty well up until I made the mistake of deleting about 80 records from the Orders table. 80 out of a 1000 records. Now our data entry form shows our customer addresses, but not customer order history. When looking at all of the tables, customer, payments, orders, they still have all of the...
5
3105
by: Aspnot | last post by:
Background: I have a data entry form that is bound to a DataSet. This DataSet contains 9 tables and the form displays data from each table in textboxes, not a DataGrid. One of the tables in the ParentTable and the rest are children. For Example: The form shows the Customer and their most recently added Contact (in textboxes, not in a DataGrid). When I click the Add button on the form, I enumerate through all of the DataTables in the...
5
1886
imrosie
by: imrosie | last post by:
Hello any expert out there. I'm yet another newbie (yan) who needs lots of help. Here's my issue. I'm trying to create an product ordering database. I set up a 'Search' form with the ability to search existing customers (and autopop info) into the appropriate fields(ie, name, address, firstname, lastname, etc.)which works so far. However if I don't locate an existing customer and need to add a 'new one I believe I should use the...
1
1882
imrosie
by: imrosie | last post by:
Hello (from Rosie the newbie), I recently got help with a wonderful event to perform this from 'thescripts'...it recognizes that a name is not in the list an allows for (after parsing first and last name) for the addition of the new FullName into the Customer table. I've been working on some other forms in this application and hadn't noticed until now a little problem. The event occurs in a 'search customer' form. You first search an...
1
1349
by: isoquin | last post by:
Upon using the built in subforum wizards, I find the end product is not exactly what I want, but close to it. For the purposes of this explanation, I'm going to use the classic example of a store's database. Tables include , , , (intuitively), whereas the first three tables are linked to in a one to many relationship. When someone goes to buy an item, a form (tied to the table) comes up for data entry. It should record things like...
28
2404
by: CatrionnaRain | last post by:
Hi All - I'm using 2002 and consider myself an intermediate Access user but newbie programmer :) I've been tasked with the db project from hell and have been combing through posts for the last week looking for relevant snippets. The problem is that my problem is multi-tiered and although I've seen hints I haven't yet come across anything like this problem. So - without further ado here's the situation. I've got a db that has 3 tables. ...
0
8242
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
8177
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
8681
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
8629
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...
0
7170
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
6112
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
5570
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
2611
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
1
1793
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.