473,756 Members | 3,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Basic Access Form Solution Please HELP!

Hi All!
I am working on this very small database and I am confused in the
designing a simple form. I only have three tables in the database.

First Table: tblExpense
Columns: ExpenseID ; ExpenseType
Data:
1 ; FOOD
2 ; AIRLINE
3 ; FARE
.....
Second Table: tblEmployee
Columns: EmpID ; EmpName
Data:
1 ; Jack Thomas
2 ; Jenny Smith
.....

Third Table: tblActivity
Columns: EmpID_FK ; ExpenseID_FK; Amount

Now, the challenge is that I need to create a form that will capture
tblActivity record for every expense types for individual employees. I
have created a combo box to select the employee on the form, but how
can I populate all the Expense types in a text boxes along with Amount
Type? My form should look like below:

Jack Thomas <<< Combo Box (selected Jack Thomas)

Food (text box) Amount (text box)
Airline (text box) Amount (text box)
Fare (text box) Amount (text box)

How can I create a form that would add above text boxes and once user
enters the information it will save it to tblActivity? I can create a
subform based on tblActivity, but I need to show all the expense types
rather than user selecting the expense type.

Please help!
Thanks in Advance!

Nov 13 '05
14 3110
Thank you very much Strasser for your detail explanation. I did
incorporate your above mention logic in my form design, but my
problem/issue still exists. It still does not show all the expense
types for all the employee (like a spreadsheet). I do not want user to
click the datasheet row and fill in the information. For e.g., if user
selects Jack Thomas as employee, the subform should populate with all
expense types (regardless of whether tblactivity contains the related
records). The form should like this:

Jack Thomas <<< combo box
SubForm:
FOOD $10
AIRLINE $35
FARE $48
.....
Once the user enters the Amount in above subform, it should get saved
in tblActivity. Please note it should list all the expense items as
textboxes and user should not have to select rows and then select
expense type.
I hope this make sense. I come up with the solution for the problem,
but I don't think my solution is appropriate. I would like to know your
solution.
Again, THANK YOU for helping me!

Nov 13 '05 #11

al***********@y ahoo.com wrote:
Thank you very much Strasser for your detail explanation. I did
incorporate your above mention logic in my form design, but my
problem/issue still exists. It still does not show all the expense
types for all the employee (like a spreadsheet). I do not want user to click the datasheet row and fill in the information. For e.g., if user selects Jack Thomas as employee, the subform should populate with all
expense types (regardless of whether tblactivity contains the related
records). The form should like this:

Jack Thomas <<< combo box
SubForm:
FOOD $10
AIRLINE $35
FARE $48
....
Once the user enters the Amount in above subform, it should get saved
in tblActivity. Please note it should list all the expense items as
textboxes and user should not have to select rows and then select
expense type.
I hope this make sense. I come up with the solution for the problem,
but I don't think my solution is appropriate. I would like to know your solution.
Again, THANK YOU for helping me!


Strasser
It's a pleasure, only I haven't helped you YET!
I THINK we are talking about the same thing, but you tell me if this
would suit your needs:
Where I am headed would feel like the following to the user:

The user would have to know 3 things to record an expense "type" and
the amount of the expense for an employee: 1) Name of employee 2)what
"type" of expense is to be recorded 3)how much is the amount of the
expense.
If the user knows these three things, he/she can record the expense.

What does the user do?

1) User selects Jack Thomas as employee
Main form displays Jack Thomas in the main form.

2) Assuming there has been no previous activity for Jack, there would
be a single empty row in the subform, indicating no activity yet
recorded.

3) In the empty row of the subform, there would be three visible
columns(with column headings): 1) a narrow column which would only be
used during the actual data entry process [after data entry this narrow
column would appear blank, even though it was NOT blank]; 2) a column
with the heading "Expense type"; 3) a column with the heading "Expense
amount".

4) The user would be directed to click in the blank, narrow column of
the row of the subform.

5) Upon clicking the narrow column in the empty subform row, a combo
box window would open, displaying all the choices of expense "types"
previously recorded in the database.

This combo box "window" would only open briefly, for the user to make a
choice of expense type. It would not be open when the main form opened
showing Jack's name.
The combo box "window" would only open when the user clicked in the
narrow column.
As soon as the user selected a choice OR clicked in any place in the
main form or subform, the combo box "window" would close and be
invisible.
So, drop down "list" of expense types, from which user would
select an expense type would only be visible to the user when the user
wanted it to be visible.
User would know "to see a choice of expense "types", he/she
should click in the narrow column and "pop", all the available expense
types would be visible, from which the user would select one expense
type. As soon as the expense type was chosen, the combo box window
would close.

Up to 30 choices of expense "types" could be displayed on one
screen (I've done this with schools, where there were over 220 choices
displayed, one under the the other, in which case the user must either
scroll down or, more commonly, just start entering the school name, in
which case the combo box jumps to that part of the drop down list).

Is this design you desire, where the expense "type" options are
displayed in a column, one under the other, when you write "(like a
spreadsheet)" and "the subform should populate with all expense types,
regardless of whether tblactivity contains the related records"?

So, the column of expense types displayed in the drop down list of the
combo box would display:
a) all the possible expense types
b) the subform design would allow a NEW expense type to be
entered, though not via this combo box.
c)the column of expense types would be DYNAMIC
(that is, if a NEW type of expense was added, the next
time the combo box was displayed, the new expense type would appear in
the drop down list of expense types, inserted in alphabetical order)

6) On viewing the drop down list of expense "types", the user would
click on one.
Two things would happen immediately:
a) the drop down list window would close
b) the expense "type" would "pop" into the subform row, under
the column heading "Expense type"

The user would see the expense type appear and realize they now had
a) the correct employee
b) the correct "type" of expense

7) The last step for the user would be to enter a dollar amount for the
expense in the same row and under the column heading of Expense Amount
(or whatever I called it at the start of this session).

8) The user could then either close the main form/subform or, if there
were more expenses to record for this employee, go to the next empty
row and repeat the process:
a) display the drop down combo box list of expense types.
b) select the expense type
c) enter the new expense amount

So, how does that suit your needs?
Strasser
PS: is anyone other than AlwaysHous...@ yahoo following this thread?
Please make your presence know by "replying" to this discussion.
Otherwise, since the topic is growing old, perhaps AlwaysHous and I
should finalize the discussion off the group discussion site.

I'm very happy to continue it here even if just one other person is
following along.
Thanks, Strasser

Nov 13 '05 #12
Your solution is ideal, but the requirement by the user of the software
is a bit weird. They would like to see all three rows in the subform
rather than the user going and selecting each expense type. The reason
is because the application anticipates 30-40 expense types and it would
be too much clicking by the user to the subform. Is there anyway to
create the subform with all the possible expense types listed? My
solution to this problem is that when the user clicks the employee, I
can invoke an event (afterupdate on employee combo box) to insert all
the possible expense types in the tblEvents for the employee. By this
way, the subform is populated with all the possible records with blanks
in the amount. My solution does not seem to me an efficient solution.
Please give me feedback on my solution and let me know of your solution
to my problem.
Again, THANK YOU very much for all the help. You have certainly help
me in many respects with this system development.

Nov 13 '05 #13
al***********@y ahoo.com wrote:
Your solution is ideal, but the requirement by the user of the software is a bit weird. They would like to see all three rows in the subform
rather than the user going and selecting each expense type. The reason is because the application anticipates 30-40 expense types and it would be too much clicking by the user to the subform. Is there anyway to
create the subform with all the possible expense types listed? My
solution to this problem is that when the user clicks the employee, I
can invoke an event (afterupdate on employee combo box) to insert all
the possible expense types in the tblEvents for the employee. By this way, the subform is populated with all the possible records with blanks in the amount. My solution does not seem to me an efficient solution. Please give me feedback on my solution and let me know of your solution to my problem.
Again, THANK YOU very much for all the help. You have certainly help
me in many respects with this system development.


Strasser
No one else seems to be following this discussion, so I suggest we
continue via email.
Why?
I will email you a a small Access database showing my suggestion.
It's much easier for you to "see" my solution and for me to "see" yours
(than it is to describe it).
What might seem "weird" right now will appear to be quite
intuitive to the user when you open the application and go through the
steps the user would go through.
OK?
If OK, email ME at wi************* *****@hotmail.c om and we will
continue.
Also, please "reply" here, so any observer will realize this is
the end of the Google Discussion Group. Anyone who comes upon this
discussion at a later date can email me and I'll forward the conclusion
of our discussion.

Also:
If OK, give me a list of 30-40 expense types, so I will
incorporate seeing all of them for the user in the example I send you.

After viewing your solution, I'll give you feedback on it.
My first reaction, I'm sorry to say, is negative, but I would like
to see it.

Strasser

Nov 13 '05 #14

Strasser wrote:
Strasser
Good!
One question:
The query including all fields from tblEmployee sounds fine.
The query including tblExpense MUST (in addition to all fields from
tblExpenses) also include tblActivity and all its fields.
I'm assuming you did this and just didn't mention it.
I'm assuming you created the two forms, each linked through the queries that formed them to the underlying tables.
1) frmMainFormEmpl oyee (linked to tblEmployee thru the query)
2) name the 2nd form frmSubform, just so we are using the same
names. frmSubform is linked to both tblExpenses and tblActivity.
The next step is to incorporate the subform into the design of the main form in such a way that there is a link between a record in the main
form (a particular employee) and the the records in the subform (a
particular amount for a particular type of sale).
When you are done, you will be able to page through the records of the main form (one employee after another). As each employee appears, there will be rows in the subform, showing the amount and type of sale for each activity.
For any employee, you will be able to add a record to the next row to create a new activity (new amount and type of sale), edit an old
activity, or delete an old activity.
The number of rows per employee will indicate the number of
activities for that employee.
So, a main form with employee name and a subform window, with a
row for each activity is the goal.
Sound right to you?

Access is going to link the main form records to the correct subform
records for you automatically, although, if this fails, you can do it
manually.
Access will only do this if you have established a relationship
between the tables, which you have done.

Here we go:
Open frmMainFormEmpl oyee in design mode.
You have to have room to insert the subform onto this main form.
Stretch out the background grid (the detail) to the right and drag it down.
Detail should now fill most of your screen.
This is where the subform will be placed.
Open the tool box > locate the icon for "Subform/Subreport" > click on the icon and release your finger > go to the upper left of where you
want the subfrom to be located on the main form > click and drag out a rectangular shape for the subform > the Subform Wizard window opens,
which is a big help!

It may NOT open if you have not installed this wizard, which is not
part of the typical Access installation. It is such a big help, that
you should go back to your MS Office CD and install the subform wizard, if, like most times, it was not previously installed.

Follow the prompts of the wizard, making these choices:
Use an existing form.
Choose from list > choose the default (not "none")
name for subform = frmSubform

I'm out of time for now.
Write and tell me how this part went.
If you can't get the subform wizard installed, you can do the
equivalent manually, but it is more tricky.
Good luck. You will be able to DO this!
Strasser


Stasser
I'm sorry but something has come up and I can't participate any more.
But I wish you luck.

Nov 13 '05 #15

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

Similar topics

3
2324
by: Lodewijk van Haringhal | last post by:
I'am new with javascritping not with programming. Is there nobody who can help me with ths simple promblem? :) Please, please give me a hint. Please help me with this script. I have two lists in my form. One to choose a directory and one to choose a picture. The script bellow works perfect without the directory choose function. I tried to make the directory choose function myself but I did not succeed. I think I made a mistake here:...
1
6027
by: Randell D. | last post by:
HELP! I am determined to stick with this... I'm getting there... for those who haven't read my earlier posts, I'm createing what should be a simple function that I can call to check that required fields in a form have values. I'm writing the values to the client using document.write only so that I can confirm that the values are there to be played with - this is not the final result so please (unless it's leading to the script failure)...
4
1861
by: Volumstein | last post by:
Hello, I am spoiled coming from programming in word and excel which offer the "record macro" tool that eliminated most basic syntax confusions that I had. unfortunately msaccess doesn't offer that option, and my luck in the groups has yielded little results for manipulating tables via vb code in a form. Could anyone illustrate a few examples for me? 1.) How would I Modify a specific cell in a table called "Mytable?"
9
12336
by: Pete | last post by:
Does anyone have a simple html vbscript or other type of snippet they can share that appends a record to a access database via ADO or DAO? I would like to allow users that don't have Microsoft Access a way of adding records to a access database from a simple web page. I don't want to have to setup ODBC or anything like that I just want to put the web page on the network for anyone to access. Most of the users would use the local access...
4
1537
by: Typpo | last post by:
Hi, This question is somewhat basic. Is it possible to call a method in frmMain, using another class? Here's a snippet: partial class frmMain : Form { private void MessageThis(String text) { MessageBox.Show(text);
2
8403
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the client side javacript code for form validation and client side editing capabilities in order to save...
4
7088
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a deployment project (myproj installer) I added my windows app to the installer under myproj installer properties, I set bootstrapper
24
6341
by: firstcustomer | last post by:
Hi, Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that someone will be able to point me to a ready-made solution to my problem! A friend of mine (honest!) is wanting to have on his site, a Javascript Calculator for working out the cost of what they want, for example: 1 widget and 2 widglets = £5.00
0
16015
by: =?Utf-8?B?S29uc3RhbnRpbg==?= | last post by:
I am currently working on the application that need to simulate basic authentication programmatically using user's credentials that are known. Basically, the need is for a single sign on with a third party application. The scenario is the following: a third party application (iChain I believe, from Novell) is used to authenticate the user against Novell eDirectory. Once authentication is complete a user is taken to a portal from which they...
0
9325
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
9152
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
9930
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
9716
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
9716
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
6410
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();...
0
4996
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3676
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
3
2542
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.