Newbie Having His First Go At SQL In Access

Oct 11, 2005

Ok, I've been given a task to create a hierarchy diagram for my company, unfortunately the diagram has to be created using one excel spreadsheet. I would prefer it if the database could be created using the smallest amount of user input, so all he user has to do is import the spreadsheet to access and hit a button then the hierarchy is created.

I'm currently only going one step at a time, trying to sort the data from the spreadsheet using queries. But this is the problem:

Raw Data table
ID, Firstname, Lastname, Status, SupervisorFirstName, SupervisorLastName

Table1
ID1, Firstname1, Lastname1, Status1, SupervisorFirstName1, SupervisorLastName1

The idea is that the hierarchy diagram should start with the boss and move down to the mere siblings like me, and everyone will be connected. But for one reason or another this isn't the case, so at the moment I am trying to move the persons record if their supervisors name is not in the tree, so the SupervisorFirstName and SupervisorLastName are not in the Firstname and Lastname column.

I have been using the following SQL

INSERT INTO Table1 ( ID, LASTNAME1, FIRSTNAME1, Status1, SUPERVISORLASTNAME1, SUPERVISORFIRSTNAME1 )
SELECT ID, LASTNAME, FIRSTNAME, Status, SUPERVISORLASTNAME, SUPERVISORFIRSTNAME
FROM RawData
WHERE (((RawData.SUPERVISOR_FIRST_NAME)=FIRST_NAME) AND (RawData.SUPERVISOR_LAST_NAME)=LAST_NAME);

When I change the LastName to "SMITH" I know how many records I should get and it works, but how can I go through both columns finding any matches??

I may have described this quite badly so if you need any more info please let me know.

View Replies


ADVERTISEMENT

Access Newbie Needs Help!!

Mar 21, 2007

Hi,

I'm designing a database for work and am using buttons instead of the navigation features already standard with access.

I need some form of code?? for my button. I want a user to be able to click this button when finished entering data; access will then save the data, close the form and return the user to a main menu, like a switchboard.

Any suggestions or indeed code, lol, would be very helpful

Regards

Chris D

View 3 Replies View Related

Newbie At Access Needs Help

Jun 29, 2006

Hi all,

I'm just having a dabble in VBA for Access so I'm fairly newbish!

I have a field [Reference Number] that increments in the table by 1 everytime - but the user has to enter this manually (its not auto-incrementing). How can I do the following: when the user selects a new row in the table it will automatically look in the table for the last entered [Reference Number], increment it, and put that value in the Userforms TextBox??

Hope you understand this,

TIA

View 5 Replies View Related

Access Newbie

Jul 12, 2006

I hope this is the correct place for this type of question.

I have two tables, let's call one the "record table" that holds each record of interest. Let's call the other one the "rule table," as each entry is a "rule." The two fields of the rule table are rule and description.

I have a form with a list box and a text box. I'd like the user to be able to choose a rule from the list box and this would control the "rule" field in the current record. However, I'd like the text box to display the description corresponding to that rule, by looking it up in the rule table.

I know I've probably made it sound very complicated, but I assure you I'm trying to do something very simple here. Thanks for any help anyone can give me!

View 10 Replies View Related

Access Newbie Help

Oct 5, 2006

I am fairly new to Access, so please bear with my hopefully easy to answer questions. I am trying to create a database for a university where we input all of our student leaders information (name, email, student ID number, etc) along with the groups they are involved with so we can track and see who is involved with alot, and so we have easy access to their contact info if we need to do that. Anyway, I have already created a database to take in all the information and spit out the reports. It is probably pretty messily put together, but like i said, this is my first time working with Access on this scale.

My question is, when I created a report to display all the students involved with a specific activity, I ran into a bit of a problem. There are two students with the same last name, and for the activity in question, they both should be shown. However, it only shows one of their names (I have it set to show the last, first) but it shows both of their activity status. What am I missing to be able to split the names show its shows both names?

Here is a link to download the access file, and perhaps someone can tell me how to fix it.

http://us.f13.yahoofs.com/bc/440a2a54me2cd2c62/bc/access/Involvement+DB.mdb?bf8mTJFBardSN6ge

All of the sensitive information has been removed. It will still work without it though.

Thanks!

View 3 Replies View Related

Newbie Need Help With Ms Access

Apr 27, 2007

I am trying to learn first how do i lock a db so that it will keep users from tampering with the forms and queries, second i am trying to learn how can i transfer the form, queries, etc. to a new ms access database without having to recreate them all over again. I recieved updates from a source of mine and it contain new information, the old database is archived. And the new db with new information is keep separate from the old information in the new database so i had to recreate the form everytime.

View 1 Replies View Related

I'm A Newbie On This Access Stuff...

Mar 23, 2006

I have a table (Master) that contains columns such as MsgLocation, MsgName, MsgScript, and MsgTxt. I want to create a form where the user would have an area to type in a 'string' and when they hit enter (or select a button), a (background) query would execute a lookup on master "where MsgTxt LIKE %string%"... For example, if a user wants a list of all MsgTxt values that contain "Please hold" they would type in a box "Please hold" and the query would use %Please hold% in the search criteria.

I don't have a clue on the first thing to do to get this done. And I'm new at this...

Thanks!!!!
Mary :)

View 9 Replies View Related

Newbie VBA Access Question

Aug 24, 2004

I've been looking through the help for this.. but I can't figure it at all...

Simply... I've set a click method for command button on form to requery some fields. In effect it's a refresh.

What I would like to do it set the same command buttons gotfocus method to call the click sub.

Private Sub Refresh_Click()
On Error GoTo Err_Refresh_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Me!SelectMSN.Requery
Me!LesseeSubForm.Requery
Me!ReviewSubForm.Requery
Me!InsSubFormQuery.Requery
Me!SecuritySubForm.Requery
Me!AssetSubForm.Requery
Exit_Refresh_Click:
Exit Sub
Err_Refresh_Click:
MsgBox Err.Description
Resume Exit_Refresh_Click
End Sub

Private Sub Refresh_GotFocus()
Refresh_Click
End Sub

Reason being the gotfocus is called from another 'input' form and I want to data to be visible in main form after a save/close button i've created.

Thanks.

View 2 Replies View Related

Help ASP Newbie Connect To Access Db Please

Nov 30, 2006

Hi

I'm new to ASP and I need to connect my webpages to an Access database I have created. I would do this in dreamweaver normally but I'm having trouble using the custom connection string function to do this. So I was hoping someone could explain how I would do this by coding it instead.
The code my web host provide to connect to a database is below. If someone could explain to me how I would use this to connect to a database, I would be very grateful. Thanks.
Quote: Dim oConn, sConnection

Set oConn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:sitesSingle??UserNamedatabasedata.md b;" & _
"Persist Security Info=False"
oConn.Open(sConnection)

oConn.Close
Set oConn = nothing

View 3 Replies View Related

Newbie Question, Can This Be Done Is Access?

May 11, 2007

Hi to everyone firstly!
i am a firefighter, we have a set number of personnel on my watch, we work 3 days of duty, each day of duty each member of the duty crew are allocated tasks, not everyone can do all of the tasks!

the tasks are :-

one person drives the fire truck
one person drives the aerial ladder fire truck
one person fills the other crew position on the aerial truck
one person is the duty-man for the day


not all personnel can do everything, some don't drive, some can't drive the aerial truck but can be the other crew position

if we have more crew members than we need one or more may be sent out to another station

what i want to know is can a data base be set up, entering data to state who did what on each actual duty day and then the database will make a report to say which watch member is next to take a turn in each position?

there a some variables, some can't drive any fire truck, some can drive the fire truck but not the aerial truck and two personnel can't be on the aerial truck who can not drive it!

sorry if it doesn't make sense!!!!

i do have a vague outline knowledge of access, i can fill tables create forms and switchboards, do basic queries and reports

many thanks

Pete

View 6 Replies View Related

A Newbie Question About Access Security

Nov 2, 2006

Hello, i have a frontend DB linked to a backend DB wich contains tables, and i want to create 2 kinds of profile : those who can do everything (add,delete,update) and others that can only consult. Here is my question : is there an object to see if i am using the profile 1 or profile 2 and can i swap them using VBA code when i launch my program DB ?
Thanks in advance for help.
VINCENT

View 8 Replies View Related

Access Version 1 Advice For Newbie !

Dec 26, 2006

Hi everyone,
I have a very old Access Database (version 1) which I need to open however I only have Access 2003.

Do I need to buy an old copy of Access or can I download it anywhere ?

P.S - IT is not my strong point so I hope it's simple...


Many thanks
Pat

:confused:

View 2 Replies View Related

Newbie: Designing A Database In Access

Nov 1, 2005

Hello,

Hoping some one could assist me? I am busy designing a database which I am going to put in access.

I have designed the tables and am now not sure how to link them. I was given an excell spreadsheet with headings and am now trying to make this into a database. Example : I was given Co-ordinator Name - Which I now split up into:

Co_First_Name
Co-Last_Name
Co_Initials
Co_Area_Code
Co_Tel_Number
Co_Mobile
Co_Email


Now there other fields like this , for example Regional Manager Name - which I have split up as above into a seperate table.

These fields all relate back to one Code - Called District

There are also a fields which needs to show the a fee required the fee paid and fee outstanding/balance .

The rest of the information required I can create check boxes for , I hope!
Anyway my question is how do a relate all these different tables together?
This is my mental block. And the check box tha information - is it stored a another table? I hope I am explaining my self correctly and I hope some one can make sense of my question

View 4 Replies View Related

Couple Of Newbie Access Questions

Jul 14, 2006

Okay, I have two questions.

First, if I have a table, and I want to combine two records together, how would I accomplish this? For example, say I have the following table.


NAME SALES
Bill 2000
Jim 500
Ted 1000


And by some miracle of science, Bill and Jim are able to fuse together to become Jill, combining their sales together. So the new table would look ilke this.


NAME SALES
Jill 2500
Ted 1000


My second question is, say I have an extended list of the same table with 30 names and corresponding sales. However, I want to find out Ted's percentage of sales of the TOP 15, not all 30. How can I accomplish this?

Thanks so much in advance for helping out a complete newbie. :)

View 9 Replies View Related

From Form To Query - Access Newbie

Aug 24, 2005

Hi all. I am fairly new to access and am trying to do something that shouldn't be that hard. I have a simple form with one text box and a command button on it. I have the command button set to run an update query.

My problem is that when I enter data and press the button, I don't know how to get the entered data into the query?

I know this is simple to do, but since I am new to access, I can't figure it out. Does anyone have a simple example or step by step details that they can share with me?

Thanks

Chris

View 2 Replies View Related

Newbie On Retrieving Autonumber From Access

Jun 10, 2005

Hi all, I am new to working with databases. My question is, how do you retrieve the autonumber ID of a field for a row just inserted into a database.

I have read numerous threads/articles, but none give me a clear picture of what the code actually looks like, just pieces(which is like greek to me). Could somebody tell me where I can see a working example of the code?

Thanks,
Mike

View 3 Replies View Related

Access 97 - Query Help - Newbie - Removing Duplicates

Jan 25, 2007

Hi,

just finding my way in Access 97 with no real support. I have made a query that creates duplicate records when I only need to see one for a certain criteria (lets say criteria X). This is due to the data feed involved in making the query where criteria X is found in numerous records.

What I want to display is only one record per entry containing an exact match for criteria X.

Finding it hard to articulate this but I would need something that defines:

If criteria X is the same, just display one record.

Hope this is somehow clear as I am struggling a bit. Would be gratefull of some help.

Thanks

View 3 Replies View Related

Access Newbie Needs Help! With Charts And Data Order

Apr 6, 2008

Hi, okay completely new to access. I'm trying to create a chart based on a query with 1 record 8 fields. I can not figure out a way to rearrange the data into two fields 8 records.

The background is I have a hundred units, each with 8 wheels. I have a table with the following fields.
-Unit part number
-Diameter of wheel 1
-Diameter of wheel 2
-Diameter of wheel 3
-Diameter of wheel 4
-Diameter of wheel 5
-Diameter of wheel 6
-Diameter of wheel 7
-Diameter of wheel 8

So, the query tells me how many wheel diameters between a certain range, with the following fields:
- Diameter >530
- 530> Diameter >540
- 540> Diameter >550
- 550> Diameter >560
- 560> Diameter >570
- 570> Diameter >580
- 580> Diameter >590
- 590> Diameter >600

Now I want to plot the range on the x axis and # wheels in that range on the y axis of a bar chart.

Any suggestions on how I can achieve this? How do I create the diameter range as a record rather than a field?

Many thanks!!!

View 4 Replies View Related

Access Newbie Question - Field Validation

Apr 9, 2008

I’m trying to create a DB with some field validations. I have a field named ‘Value’ and a field named ‘Doubled’. Value is in a currency format. ‘Doubled’ is in a Y/N format. I want a to create a rule that prevents the value ‘Yes’ from being entered in the ‘Doubled’ field IF the value in the ‘Value’ field is greater than .60. How do I do that?

I entered "[Value]< .6" but that wouldn’t allow me to put any value in the ‘Value’ field – it popped an error every time.

Thanks for helping out a newbie!

View 1 Replies View Related

Newbie Question - Sending Email From Access

Mar 10, 2007

Hi,

I have a request from work to create a button that will allow only certain fields from a record, ie tracking number, to be sent to that client's email in the record by adding a button to the form that will automatically send the field.

Can someone help me?
Thanks.
Trevor.

View 4 Replies View Related

Newbie Needs To Find Out How To Remove Autonumber From Access Customer Order Template

May 19, 2006

I am trying to use the template provided in the Access database wizards, pages and projects. Its called Order Entry. What i would like to do is edit the template to fit my needs but i need to change the Product ID feild from Autonumber to a product id of my own. I would however like to keep it as the Key.

Any Suggestions?

Mulith

View 1 Replies View Related

Newbie Needs To Find Out How To Remove Autonumber From Access Customer Order Template

May 19, 2006

I am trying to use the template provided in the Access database wizards, pages and projects. Its called Order Entry. What i would like to do is edit the template to fit my needs but i need to change the Product ID feild from Autonumber to a product id of my own. I would however like to keep it as the Key.

Any Suggestions?

Mulith

View 1 Replies View Related

Help The Newbie!

Jun 24, 2005

Great forum!! Hope I someone on here can help me!

Here's the situation. I have a Database in Excel (~3000 rows & 7 Columns)

The first Column has numbers like this (3-10-34 or 223-7-45) the other columns have names, addresses and other stuff.

What I'm trying to do is to eliminate the use of huge binders. I want to have a Blank screen with only one input box where I can type a number and retrieve a specific row from my Database. Time saving.

Now, when I'm searching, I usually only have the first numbers before the dash (such as the 3 or the 223) not the other numbers. So I cannot input 3-10-34 for instance. I can only put 3...:confused:

I've already imported it to Access and it works fine but have no idea how to do what I just described!

Thanks for the input!!

A very very green access user! :o

View 11 Replies View Related

Newbie Sorry

Oct 19, 2005

Hello

sorry if this question is answered somewhere else i did check through the forum a bit first

anyway to the question

is there a way in access 2003 so when i change a value in one table it creates a new record in another table

example

i have a table called tickets and one called fixes, when i change a value in a record in the tickets table i want a new record in the fixes table to be created for me

any help would be great

ADAM

View 5 Replies View Related

Newbie - Need Help Please

Nov 3, 2005

Hi there,

I am not sure if i am supposed to post in this section......

--------------------------------

Using Access 2003.

I am very new to Access and have started off very well building my first project..

My help is that i would like a macro button to delete a record once you have put in to the database if that is possible also i would like a save button if that is possible...

I have put a Tab Contol on and want to change the backgound but i can't see on the properties box to change this. Is there a piece of code that allow me to do so...

Hope some one can help

Emailjunky

View 1 Replies View Related

Newbie - Need Some Help

Nov 3, 2005

Hi There All,

I am still very new to Access 2003 and have started off very well..

Just a few help please:

Help 1. I need a macro button that will allow me to delete a record from the database via a form.

Help 2. I need a macro button to save the database if that is possible via a form.

Help 3. I have a Tab Control on my form and i want to change the background of the Tab Control but can't find it on the properties is there a piece of code i can put in to VB which will do this for me or is there another way.

Hope someone can help

Emailjunky

View 2 Replies View Related







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