Simple DB Trouble - Entities, Tables Etc

Sep 6, 2006

Hi

i currently have a simple spreadsheet in Excel containgin the following fields.

## Date - not unique
simpy shows the date of the transaction

## Debt - who the debt will be paid to - unique per date (e.g. CompanyA)

## Type of debt - what service is it - not unique by date or debtor (e.g. Wages)

## Net Price before VAT (X)

## VAT (value added tax, a UK tax) (Y)

## Price of Service (Z = X+Y)

## Running total of Net Price before VAT (X + X + X...)

## Running total of VAT (Y + Y + Y...)

##Balance - (Z + Z + Z...)

The spreadsheet currently calculates this automatically using simple formulas.

I'd like to create a nice little interface for this data entry using MS access forms. From then I can easily create queries and reports etc.

can somebody please help me out! :D I've tried to list my entities and create an ERD to no avail!

Many Thanks

Mike

View Replies


ADVERTISEMENT

Trouble With A Simple Dlookup

Apr 12, 2006

I am trying to use dlookup to fill an unbound textbox on my form. I know I am doing a simple thing wrong and I cant figure out what it is.

My form has a field from table(m5Warehouse) called M5Location. It is a bin location. My form has an unbound textbox called BinMax.

I have a table called tblbinmax that has 2 columns. Binnumber(same as m5location) and binmax(maxinum number of pallets that can be placed in bin)

When i fill in M5location on my form, I wanted code to fire on afterupdate to look in tblbinmax, look at the binnumber and put in the value in unbound textbox called BinMax.

This is my code: me.binmax.Value = DLookup("[binmax]", "tblbinmax", "[binnumber] =" & Me.M5Location)

I have tried every way i can figure to make this work, and i keep getting error message, name?#, etc. I get error msg 3075 and error msg 2001...PLEASE HELP!!

View 2 Replies View Related

Simple Form Question, But Having Trouble

Jul 11, 2006

I have a form, where the users choose a name from a pull down box and enter the date and other information. The pull down box has more than 100 names. The information such as the name, date, etc. gets stored into a table. It is fine if a certain name appears more than once on the table. I want to create some code, where if I click a button, it counts how many times each name appears in the table and outputs this information. I want the output to have the name in one column and the number of times it appears in the second column. Any ideas on how I could do this. I am very new at access and VB. I would appreciate your help. Thank you. (Basically I want to see how many times each name has filled out the form)


For example,

smith 3
doe 4
bell 8

View 2 Replies View Related

Help With Entities

Jul 17, 2005

Hi

First off I want to say I have tried to answer thsi for myself, I have a number of books and I have looked there for the answer, but not sure whether I am understanding it all properly, perhaps I am making it more complicated than I need to :confused:

I want to design a simple database for keeping track of an audit I do monthly at work. I have made sense of the following:

1. I know for sure that I have 2 entities for sure, PrimaryNurse and Patient;
2. I know that each PrimaryNurse is "PrimaryNurse" to 1 or more Patients;
3. I know that each Patient has 1 and only 1 PrimaryNurse;

What I am not sure about is whether the items I audit (they are all to do with the patient, for example is there a photo of them in their clinical file, have they had their legal rights read to them, etc) are to remain in the Patient Table as simple "yes/No" or to be moved to a table of there own.

I apologise if this is yet another simple question for those of you who already understand. If you could shed some light on this that would be great as I want to learn as opposed to just asking for answers.

Thanks

View 5 Replies View Related

Entities

Aug 24, 2006

Can people give their thoughts on the following sernario.

When I have been taught database design in the past it has always been with the aid of examples that have very distinct entities. For example: People loan copies of books.

For the sake of simplicity say you have a booking system.

Event(EventID, EventName, EventDate)
Person(PersonID, Firstname, Surname, ... Postcode)
Booking(BookingID, Person, Event, Guests)

This is the same level of simplicity. However I have never been shown an example where the person entity is more specialised.

What if a database needs to hold details on people of different types? Say you hold college students, school techers and business owners. The details that is required on each is:

Student(Firstname, Surname, College, Address, DOB)
Teacher(Firstname, Surname, School, JobTitle)
BusinessOwner(Firstname, Surname, Business)

I assume that this requires three tables as appose to the one Person table but how does the booking relationship work?

How would you link Events to perople of all three types?

View 4 Replies View Related

Different Types Of Entities In The Same Table

Apr 20, 2005

Hi,
I am designing a database.
It is going to store data from questionnaires.
The natural way seems to be to have a table - that stores where the data comes from, what is it about, what is the question and what is the answer, like this:
DataProviderID; FocusID; QuestionID; AnswerValue

My problem is that a Focus could be a eg. a Person, a Company or a Job - meaning that somebody may be giving info on an other person, on a Company or on a Job.
Now Persons, Companies and Jobs would have very different properties.
So how should I solve this shold I have a common table for Peoples, Companies and Jobs and use a very complicated structure of properties for them or should I store these entities in separate tables but than how will I store the results?

Thanks for your thoughts.
SWK

View 3 Replies View Related

Trouble With Tables

Dec 11, 2006

Can someone please help me, I might have my logic a little backwords.


I have a table (tblLoanDetails)

LoanNumberID
etc.
etc.
etc.
EscrowCompanyID


then I have a table called (tblEscrowCompanies)

EscrowCompanyID
EscrowCompanyName
EscrowCompanyAddress
etc.
etc.
EscrowOfficerID

then I have a table called (tblEscrowOfficers)

EscrowOfficeID
EscrowOfficerName
EscrowOfficerSalutation
EscrowOfficerEmail


What I am trying to do is when someone is filling out the first table (tblLoanDetails) they have a dropdown to choose the escrow company, then they must choose the escrow officer

Each escrow office can have many officers, however, when they choose the escrow officer from a dropdown, I only want that offices escrow officers to appear in the dropdown.

Any help would be greatly appreciated

thank you

Josh

View 1 Replies View Related

Trouble Linking Tables

Dec 14, 2004

Hello,

I created a sys admin database and the big problem I am having is linking the hostname field in table 1 to the hostname field in table 2. I have tried making both fields primary keys, I have tried creating a relationship to the two fields between the two tables. I have tried adjusting the join types.

Yet, no matter what I try, the hostnames from table 1 will not populate in table 2. I have even tried adding a new hostname to see if it would populate and it won't.

any ideas?

Thanks,

stillabeginr

View 6 Replies View Related

Trouble Updating Parent Tables With Child Table/form

Jul 6, 2006

Sorry this is so long but I am trying to make it as detailed as possible...

The Setup

My database is similar to the sample "Service Call" db. I have a main table called "tblTT" which has an autonumber primary key. The table also contains several foreign keys such as UserID (not an autonumber) from "tblUser", TechID (also not an autonumber) from "tblTech", etc. I have the relationships setup with "Enforced Referential Integrity" for both updating and deleting records. Each relationship has a RIGHT OUTER JOIN ("Join 3" in access) so that all records from child (tblTT) and only equal from parent (tblUser, tblTech, etc.) will be included. I have a form for nearly every table which serves different purposes but the main function of the DB is to create new Trouble Tickets (TT's), a.k.a. service calls. Therefore the main form used is my "frmTT" form in add mode. The form contains all the fields from my "tblTT" table and contains (directly) no fields from any other table (I guess indirectly it contains fields from all the parent tables...).

The Problem

When I pull up "frmTT" and try to create a new Trouble Ticket for a user that does not yet exist in the table "tblUser" I get the error "You cannot add or change a record bcause a related record is required in table 'tblUser'".

What I want is for my users (the "Techs") to be able to create a new Trouble Ticket without having to worry about populating the "tblUser" table (and other parent tables) first.

My Solution

I was going to (and unless someone can find an answer for me still will) fix this using VB script by setting up a query to check all the parent tables for the values in their corresponding fields in the form. If the query returns no results an "INSERT INTO" statement will run to populate the parents tables so that the form will save itself into the Trouble Ticket table ("tblTT").

I feel that this is a huge work around and not the proper fix. I would prefer to do this the right way both to have a correctly setup DB and for future reference. Can anyone help me with this?


Thanks,
Andy

View 3 Replies View Related

Connecting Super Type & Sub Type Entities With A Condition

Sep 21, 2004

hi friends,
i have tried had to connect sub type tabels (Saving, Checking, Loan... they have their own ids...) with super type (Account...it has account id...) on the condition of account_type (either "S","C" or "L") attribute in ACCOUNT entity.
how to joint them??? with query or with expression??
i expect help from you.........please.
........thanks.

View 5 Replies View Related

Probably A Simple Question About Tables

Apr 6, 2006

I am trying to find out what the little arrow next to specific tables is, I believe it's something signifying that it's an updated table....but if I copy one to replace with a new one yet want to keep that old one for a side by side comparison, how do I remove that arrow?

I know this is probably very confusing how I am asking but hopefully there's some really simple way to do this.....or hopefully I am making sense.


Basically this is a This Year Vs Last Year Comparison with data exctracted from a main frame, brought in on a daily basis in the new table and I want the results of all of last year to remain in this other table...so basically FY 2005 vs FY 2006

Hope this makes sense
Thanks

View 4 Replies View Related

Please Help With Simple Query (only 2 Tables!)

Sep 5, 2007

I'm using Access 2000. I have 2 tables in my query: tblPlace and tblConnection. Using a form and the Connection table I can link 2 places together from the Place table and present it in a query; for example:
SELECT tblPlace.Place_ID, tblPlace.Name, tblPlace_1.Place_ID, tblPlace_1.Name
FROM tblPlace AS tblPlace_1 INNER JOIN (tblPlace INNER JOIN tblConnection ON tblPlace.Place_ID = tblConnection.Place1) ON tblPlace_1.Place_ID = tblConnection.Place2
WHERE (((tblPlace.Place_ID)=13) AND ((tblPlace.Type)="Street") AND ((tblPlace_1.Type)="Street")) OR (((tblPlace_1.Place_ID)=13) AND ((tblPlace.Type)="Street") AND ((tblPlace_1.Type)="Street"));
http://www.rarekungfumovies.com/sydenham/access1.jpg
Here I want to find out which other streets link to street 13 (Perry Hill). Running the query shows 5 different connections:
http://www.rarekungfumovies.com/sydenham/access2.jpg
I need to somehow combine both sets of IDs and street names (except Perry Hill), so that I end up with a filtered list in alphabetical order:
17 Bell Green
38 Castlands Road
12 Catford Hill
14 Elm Lane
16 Perry Rise
Is there any way this can be done so that I end up with only the above data? :confused: Any help would be much appreciated!

View 2 Replies View Related

Simple Question About Showing Tables In Form

Aug 9, 2006

Hi
I have a form which has two command buttons A and B. I set that when somebody click the button A then table A will be open and so on. But I dont want that table opens in new window. I want that I can "draw" a "box" in form where the table will showed. So can anybody help me and tell how to set that table will always show in "box". Can I set this somewhere in Access or do I have write VBA code. (I'am very very poor at coding)

View 4 Replies View Related

Tables :: Simple Cascade Update Not Working

Oct 29, 2013

I've done this tons of times, so I don't understand what's happening... The title says it all: when I update the ID of one record of the main table, the referenced records on related tables won't update even though they have a relationship between them with the option "Cascade update" clicked.

In the attached database, the main table "Expedientes" is related to table "Actuaciones".

View 1 Replies View Related

Tables :: Avoid Double Bookings In Simple Database?

Jun 7, 2013

I work across a number of small venues which have art cases that can be booked for displays. I am trying to build a simple data base to report what space is available and also what art is currently being displayed. The art is usually booked by month, but sometime it can be booked for a week etc.

I have set up 3 tables

Art Inventory

Art Cases by Venue

Art Case Bookings

In the art case booking form, I have set up the start and end date but I cannot figure out how to avoid double bookings of a case? Once I have that worked out I believe I know how to build the required reports for my needs.

View 4 Replies View Related

Simple Question For A Simple DB

Dec 29, 2006

Ok I am right now making a simple Vendor/Product database to create a line sheet for some sales folks. I have 3 tables: Vendors, Products, and an associate entity Vendors_Products to relate the two. I have a form currently that draws the Vendor Name (primary key) from the Vendor table and the Product Name from the associate entity. This allows me to create new vendors and select current product types from a drop down box. The problem is that the drop down box is too long and it is tiresome when 1 vendor has 10 product types.

Can anyone tell me how to resolve this? I thought it would be better to have option buttons and display all available products. Then you could just click all of the option buttons that apply to that Vendor and it would create the relationships...is this possible?

View 1 Replies View Related

Look-up Trouble

Jun 20, 2005

Hello. Recently posted for advice on building an access database on health service training. I had a lot of help but I suppose I haven't really grasped relationships yet. My database looks like this:

tb_staff containing staff_id, first_name, last_name, base, dept_ward, job_title
tb_courses containing course_id and course
tb_training_done containing staff_id, course_id, date_trained, trainer, venue

I have 1:M tb_staff to tb_training_done and the tb_training_done is linked to the tb_courses 1:1 - not sure if this is right but it's the only way access will do it.

Anyway, my idea was to use a form and subform to enter training done but after setting up the lookup it won't allow duplicate courses i.e. same course done each year. Can anyone explain how the lookup works? Where are the details of courses done stored?

Hope that's not too vague?

View 2 Replies View Related

Having A Tad Of Trouble

Aug 6, 2007

im having a bit of trouble generating a field in one of my queries. i think its fairly simple, all i want to do is have the field in my query to show a date, that is just calculated by subtracting 5 days from the current day. i have something that looks like =Now()-5 but that doesnt work obviously. so im just asking whats the imput going to look like if you want to subtract 5 days from a date? oh and im using short dates for the date inputs

View 2 Replies View Related

In Trouble

Sep 13, 2004

I am trying to build a report that lists all call in's and all tardies on the same sheet. They are two different tables, that I made queries out of because of calculation fields. Do you know how I can include all the needed data in the same report?

What I'm getting when I try is either all call-in's for each name that has tardies or vice versa. I need to see all data on one report

The reason I didn't just put all the data in one table was because we track call-in's by occurence, but we track tardies by pay period. So each call in is logged in the call-in table with the date it happened on, and the tardies are logged in by pay period, so only the total is stored in the field.

Do you have any ideas? I'm really stuck and I've been workin' on it for three days now and I don't think I'm going to find the solution by myself. Sorry. Thanks!

KellyJo

View 5 Replies View Related

Newbie Still Having Trouble

Jul 5, 2005

Gee, I know this is probably so simple...I've never in my life worked with any kind of data base program. I've spent 2 hours trying to make it work and it doesn't. I've tried so many things that I can't even remember what steps I did. I'm trying to create a one column list for phone numbers, no names or anything else...the most important thing is that when I add new phone numbers to this list I want Access to alert me that it is a duplicate and not allow me to add it.....first of all it won't let me add entries with dashes such as 312-5964, I tried selecting "numbers" and also "auto number", both didn't work, what am I doing wrong...can someone give me the steps from the beginning please....I don't have time to figure this out and it's holding me back from finishing a task. I have to get working on my Video Professor Learning CD for Access which I have at home, but right now I'm at work and can't do that...hellllllllp! I'm ready to tear my hair out :eek:
Thanks, Rosey

View 2 Replies View Related

Trouble Copying DB From CD

Mar 13, 2006

I have an Access DB I have to put on numberous laptops. The DB is being transported via a CD. When i try to copy the DB from teh CD to a new folder on the laptop I get messages that the DB may have a virus and it cant be copied, or I need to install a microsoft service bulliten...xxxx ( I am not sure what the number is). The DB does contain VBA code and I am certain it is virus free. Is there some setting in access which enables this file to be copied on laptops which do contain virus or firewall protection or must I disable virus protection on these machines before instlaling the program or is it another issue altogether. Thanks.

View 3 Replies View Related

Big Trouble With Autonumber

Mar 27, 2006

Hi

I have genreated an autonumber in my table, at this is used as key. after importing 135 records it starts to jump 48 records before it creates a new. This means that with every record i import after 135 i have a space of 48 between each. So what sort of thing can cause this? and even better how do i fix it?

Best Regard
Roald

View 2 Replies View Related

Trouble With Filters

Jul 6, 2006

I have been using the forums for the past month and a half, and they have been extremely beneficial to me. I am working on a database that cross references my companies Steel standards to American standards. I am trying to make it searchable in a couple of different ways. I have borrowed code found on this site to make two different search engines. One works very well but the other I am getting hung up when I try to switch from the previous code to mine. below is an example of my code. It is taken from code placed on here previous called "SampleSearch"

Private Sub cmdSearch_Click()
On Error Resume Next

Dim sSql As String
Dim sCriteria As String
sCriteria = "WHERE 1=1 "

'tblSubject qrySearchCriteriaSub
If Me![Spec] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub.Spec = """ & [Spec] & """"
End If

If Me![SteelType] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub.SteelType like """ & [SteelType] & "*"""
End If

If Me![Group11] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub.Group11 like """ & [Group11] & "*"""
End If

If Me![Group143] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub.Group143 like """ & [Group143] & "*"""
End If

If Me![Substitute1, Substitute2, Substitute3, Substitute4, Substitute5, Substitute6, Substitute7, Substitute8, Substitute9] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub.Substitute1 = """ & [Substitute1] & """"
End If

sSql = "SELECT DISTINCT [Spec], [SteelType],[Group11],[Group143]from qrySearchCriteriaSub " & sCriteria
Forms![frmSearchCriteriaMain]![frmSearchCriteriaSub].Form.RecordSource = sSql
Forms![frmSearchCriteriaMain]![frmSearchCriteriaSub].Form.Requery
'[Spec], [SteelType],[Group11],[Group143]

'frmSearchCriteriaSub.Requery
End Sub

I apologize also because I do not know how to post this in a scrollable window. If someone could help me with that too.

The problem with the code is that I am using a form to filter a query, this will then display the table of the steels that meet the requirements. However, I have altered all of the fields to my names and the combo boxes have my information, but they do not seem to place any parameters on the query. I attached the original DB that I got this code from any help would be appreciated.


Riley

View 2 Replies View Related

Trouble With Log In Script

Apr 5, 2007

I have a access 2002 database that was handed down to me.. this program does some document control, set up with access rights for different users.I got into it to clean it up a bit and I've hit a snag. I converted the database from a 2000 to a 2002. Amidst playing around with the Log-In screen somehow my Log In button stopped working; except if you type your password and then hit enter.Now the Log In button ( cmdLogIn_Click() ) is pointing at the same exact script as the ( txtpassword_KeyDown(KeyCode As Integer, Shift As Integer) ) function.I don't know any VB and I'm not really familiar with Access, so if anyone could decode this for me I would be really grateful. Here is the script that those two functions are pointing to:Private Sub LogIn_Click() Dim strPassword As String Dim strPasswordAttempt txtPassword.SetFocus strPasswordAttempt = txtPassword.Text cboUsername.SetFocus strPassword = DLookup("[Password]", "User", "[Username] = '" & cboUsername.Value & "'") If strPasswordAttempt = strPassword Then strUsername = cboUsername.Value intAccessLevel = DLookup("[AccessLevel]", "User", "[Username] = '" & cboUsername.Value & "'") bolApprover = DLookup("[Approver]", "User", "[Username] = '" & cboUsername.Value & "'") bolEditDocumentInfo = DLookup("[EditDocumentInfo]", "User", "[Username] = '" & cboUsername.Value & "'") bolEditUserInfo = DLookup("[EditUserInfo]", "User", "[Username] = '" & cboUsername.Value & "'") bolEditReferenceDocuments = DLookup("[EditReferenceDocuments]", "User", "[Username] = '" & cboUsername.Value & "'") bolViewAllApprovers = DLookup("[ViewAllApprovers]", "User", "[Username] = '" & cboUsername.Value & "'") bolDocumentControl = DLookup("[DocumentControl]", "User", "[Username] = '" & cboUsername.Value & "'") ' MsgBox "Your access level is " & intAccessLevel Startup ' run startup sub DoCmd.OpenForm "Welcome", acNormal DoCmd.Close acForm, "Login" LogEvent strUsername, Now(), "Login Successful", "Network Username: " & strNetworkUserName & " on Computer " & strComputerName 'LogEvent strUsername, Now(), "Login Successful", " on Computer " & strComputerName Else MsgBox "That password is incorrect. Try again." LogEvent "Unknown", Now(), "Login Failed", "Attempt: " & CStr(cboUsername.Value) & " , " & strPasswordAttempt & " Network UserName: " & strNetworkUserName & " on computer " & strComputerName End If End SubWhen you click the Log In button it does actually run the script, but it gives me the "The password is incorrect. Try again." message even if the password is correct. I can just click into the txtpassword box and hit enter and it will log me into the database.P.S. I say again, this isn't my code.. its probably super ugly, but I cant' tell :o

View 3 Replies View Related

This Forum Got Me In Trouble...

May 1, 2007

Hello all active members of this forum,

Like I stated on the title, this forum got me into trouble. By following the reading in this forum and some recommendations from the regular users I have created thre database for the place I work at. now they want me to be the official DB admin! :eek:

So now I'm coming back to you guys for more advice... :rolleyes: what reading should I do to better my Access knowledge over all.

Any recommendation is welcome.

I have already contacted th local college and they do have a distant learning class for Access and I will be taking it the next semester, but I would like to do some reading into becoming a REAL Access programmer with a solid foundation.

There must be some good books out there to purchase to get me started. So all are welcome to give me some feedback.

Thanks!

René

View 14 Replies View Related

Trouble Importing- Pls Help

Sep 6, 2007

Access 2002.

Hey guys-
I have a software program that I am exporting data out of into excel (it's SQL based). From Excel, I then am importing into Access into an existing table previously created from a similar file (same columns, just different record sets). I am running into problems when importing files...

If I import into a new table, and have Access create the table based off of the Excel file- it works fine. If I try to import more records into this same table, it tells me it failed to import and that an error occured (no error's table created, no error number given). If I delete the original records in the table, and re-import the SAME RECORDS that were originally imported to create the table- it doesn't work. It will only import my files if it creates a brand new table for each import, every time.

Can Access not import into an existing table? It should- but I dont get what's going on here. I have tried DBF, HTML, txt files- all the same results. I really don't want to have to create a new table each time- as now my Queries will have to be updated everytime I create a new table. Can you please help?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved