Some (expert) Advice Needed Please (linking Field With String In Other Field
Oct 3, 2005
Hi,
I hope someone can help me, I have a database compiled from different sources which means that information in fields that need to be linked are written differently, meaning that I can't just simply make a relationship between them.
The two tables I would like to link are,
Table 1 has the fields OCCUPATION and AMOUNT and contains over 740,000 records.
Table 2 has the fields COMPANY_NAME and TICKER and has 500 records.
I need to find a way for all COMPANY_NAME fields in table 2 to be cross-referenced with the OCCUPATION field, so if COMPANY_NAME is part of the string in the OCCUPATION field then the TICKER (of that company) can be attached to the record in table 1 (specifically to AMOUNT).
The problem is that the OCCUPATION field is not written in a standard form and can include either only the occupation, only the company name, or both in either order.
I can make a seperate query for each company by using as criteria "like "*[COMPANY_NAME]*", but then I would have to do this 500 times!!! Is there a way to automate this?
The final purpose is to link the AMOUNT to TICKER so as to find the sum of all the amount associated with a company.
I really hope you can help, I have little programming knowledge and it will save me the time of making 500 seperate queries. The final use is for my thesis studying private contributions in the american elections.
I'm looking for advice on the best method to accomplish the following from the esteemed members of this Forum (You all have provided excellent advice in the past to this Access Dummy, with my thanks), (I've also searched the forums without result):
I would like to make several fields "required" fields on my form, easy enough, in that I set the Required property on the table to "Yes".
What I would like to happen on the form is that when a user tabs out of a required field, a message box pops up that says "This is a required field" and/or when they click any of the following command buttons I've created, "Save Record", "New Record" or "Close Form", that a message box pop up and list the required fields that they missed.
Any ideas, with code, macros, or other solutions would be greatly appreciated, keeping in mind that I'm just not that swift to start with.
I am trying to execute the SQL below (tested in other programs, works fine) but access is giving me the "join expression not supported" error. How can this query be used in MS Access? I have tried breaking some of the joins clauses into separate queries, but I can't get it to work and it is making things much more complicated. Also note that moving the join conditions to the where clause could impact performance (this is a very large DB) Could I execute this via code somehow? Thanks.
SELECT lp.loan_id, lp.days_delinquent, lp.current_balance, pc.product_name FROM mtgwl.loan_payment lp inner join mtgwl.deal_loan_relation dlr on lp.loan_id=dlr.loan_id and lp.time_out='9999-12-31-23.59.59.0' and lp.as_of_date='2006-04-30' and dlr.time_out='9999-12-31-23.59.59.0' and dlr.type='DEAL'
inner join mtgwl.deal_loan_relation pdr on dlr.deal_id=pdr.loan_id and pdr.time_out='9999-12-31-23.59.59.0' and pdr.type='PRODUCT'
inner join mtgwl.product_control pc on pc.product_id=pdr.deal_id and pc.time_out='9999-12-31-23.59.59.0' and pc.product_name='GSAMP 2003 AHL'
I am trying to execute the SQL below (tested in other programs, works fine) but access is giving me the "join expression not supported" error. How can this query be used in MS Access? I have tried breaking some of the joins clauses into separate queries, but I can't get it to work and it is making things much more complicated. Also note that moving the join conditions to the where clause could impact performance (this is a very large DB) Could I execute this via code somehow? Thanks.
SELECT lp.loan_id, lp.days_delinquent, lp.current_balance, pc.product_name FROM mtgwl.loan_payment lp inner join mtgwl.deal_loan_relation dlr on lp.loan_id=dlr.loan_id and lp.time_out='9999-12-31-23.59.59.0' and lp.as_of_date='2006-04-30' and dlr.time_out='9999-12-31-23.59.59.0' and dlr.type='DEAL'
inner join mtgwl.deal_loan_relation pdr on dlr.deal_id=pdr.loan_id and pdr.time_out='9999-12-31-23.59.59.0' and pdr.type='PRODUCT'
inner join mtgwl.product_control pc on pc.product_id=pdr.deal_id and pc.time_out='9999-12-31-23.59.59.0' and pc.product_name='GSAMP 2003 AHL'
I'm pretty good with setting up a very simple database such as inventory, profiles, etc.. However I'm creating a database to keep track of a football (soccer) team's players and match statistics.What I have so farsample attached)
Tables: * Players - PlayerID, Fname, Lname, position, goals, assists, etc (all details regarding a player) * Position - Positons (Table containing positions eg: defender. Data is selected in player's form as a combo-box) * Competition - Competition types (Cup, League, Friendly. Data is selected in Match's form as a combo-box * Venue - similar to Competition table * Opponent - Similar to above two tables * Match - MatchID, Competition, Venue, etc (form corresponding to table attached)
Forms: * Player form * Match form
Now as shown in the sample, I choose players using the combo-box. Then whatever stats they had during the match are entered on the fields provided. How to link the player (selected using combo box) to the stat fields (goals, assist, YC, etc).
This is my first post here and was just hoping for a bit of advice, what it is my dad wants me to create a small database for him and was hoping for some advice on how to tackle it. What he wants is listed below. I have some ideas but the most confusing aspect I found was how to update a persons age from the computers date.Heres what he wants and hope you can give me some advice. Thanks in advance John
Fields (free text unless otherwise stated) for people;
First name Surname Age Further Education level - drop down menu for "GCSE/A level ,HNC/HND, Degree, MSc, PhD" Degree held? - drop down menu "yes" or "no" Chartered engineer - drop down "yes" or "no" Professional Quals - free field for these Skill base 1 - drop down for " Manager - Operations, Production, Maintenance, Engineering; Engineer - Mechanical, Instrument, E&I, Electrical, Rotating Equip, Process, Asset Integrity, Inspection, QA/QC; Superintendant/Supervisor - as above; and any others (think of all KPO Ops parented people) Skill base 2 - as above Skill base 3 - as above Professional ladder job title Grade - drop down menu BG3,BG4. BG5 Hay points Date of birth Age - can this be generated from entry above and current date?
Current Assignment job title Current Assignment start date Current Assignment Asset Current Assignmnet end date Current Assignment location (eg Cairo, Idku etc) Currnet Assignment type - drop down menu rotation 14/14, rotation 28/28, expat
Next assignment options Comments
Then set of data fields for posts
Post job title Post type - drop down rotation menu as above Likely Start date Location Asset Sponsor in Asset
People Reports
People - All data People - Listed by current job end date People - Listed by skills (if Mechanical in any of three fields above, list him), will be repeats of names in list (as have more than 1 skill but thats OK) People - List of those with degrees People - List of those chartered People - Listed by current job end date People - Listed by current job end date People - Listed by current job end date
I built a DB for work (Access2000) which is on the network and is for inputting maintenance request. Nothing complicated about it and at any time there would probably only be 3-4 users logged on at a time, and then probably only for a few minutes each. This DB got corrupted yesterday and I had to recover from teh backup. I compact and repair manually on a weekly basis(usually). My question is would it be less likely to get corrupted if I split the DB? Would it help to set up an automated complact & repair to run overnight? Thanks RussG
Im currently building a database which holds customer delivery options, quantities, unit and delivery price and so on.
It has all been going fine until now...!
I am trying to setup the billing aspect. My main headache is that each customer could have a delivery every day, of different quantities. Now there will be times when this customer goes on holiday and of course doesnt need to have anything delivered - my only problem is getting the billing to adjust accordingly.
I have my SubForm which contains:
UnitName UnitPrice Mon Tues Wed Thursday Fri Sat Sun DeliveryCost TotalCost
at the moment in the main form the holiday period is put in and i convert this then into a number of days value - this is then subtracted from the total of units (count of Mon to Sun) x UnitPrice + Delivery.
My problem is that if a customer has 2 days off which are Mon and Tues, how do i get it to only remove the mon and tues values from the unit amount - instead of just removing a figure assuming that they have only 1 per day - wihch in most cases they don't.
Can i somehow assign the day values to each day field in the subform and get the correct days from the holiday or something!
I have a database that has one aspect that is highly dependent on certain payroll information. For example:
When a pilot begins entering his flight for the day at the bottom of the entry form it tells him the payroll dates are from x to x and you have worked X number of days in this pay period.
This part I have gotten down quite nicely using a payperiod table. Problem is that I must enter that information manually and it is time consuming to do that for the whole year. Point of fact I only put the first day of the pay period in this table. Our pay periods are every two weeks.
I also generate a report for payroll based on these pay periods.
My question/advice is a new way of going about this pay period deal without having to enter it in manually every year.
We have these wonderful computers but I feel I am doing too much work but just don't see a different method around it.
A bit wordy but I wanted to be clear. Any advice in a new direction?
I'm looking for some advice: the problem is that I've got 13 sections in which people are working, and administrative assistants that are taking care of 1 or more of these same sections.
In addition to the usual security, there is also a requirement to make the AA's only output their own sections reports.
The way I see it there are two ways to ensure this:
1) put in a field in the users table that would indicate which sections the AA was responsible for ie
userID 1 respFor 56,34,45
userID 2 respFor 41,3
userID 3 respFor 42
... etc respFor would have to be a text field with a delimiter between each sectionID
sectID 41 sectName AAA
sectID 42 sectName BBB
2) have a separate table that will form a "union" between user and section tables ie User&Section
userID 1 sectID 56
userID 1 sectID 34
userID 1 sectID 45
userID 2 sectID 41
userID 2 sectID 3
userID 3 sectID 42
Now for my question: Can you advise me on which way is best for this circumstance? or perhaps you've got another way to go? Have you got an example ?
Greetings! I am setting up a database in Access 2003 for a Seniors Program. Through this db I need to set up forms where they can add information on individual members, denote which programs they participate in/pay dues for, etc.
Any advice you all could give would be greatly appreciated.
EDITED TO ADD: I'm basically a newb when it comes to Access...I can do the basics, but need to go beyond what I know to do this project...
I am new to access and despite reading what seems to be a mountain of stuff I'm a bit stuck. Can somebody point me in the right direction to achieve the following.
This is a simplified version of my problem, but it is the principle I'm after.
I have a query, the results of which look like
FIRSTNAME SECONDNAME ITEM ITEMSIZE
There are multiple results with the same firstname and secondname but different item info. e.g.
Bill Smith Shoes 10 Bill Smith Shirt 16
I need to be able to produce some output - table/report/query (to be export to excel) where there is only one record per (FIRSTNAME SECONDNAME) of the form
I wonder if someone could help me, i have started to create a database which will be uses for a gardening service company.
I have created the customer database table and form which him quite impressed with the say ive never done it before.
I also followed a tutorial from the net which was based around a video rental shop, ive put in in the transdetail and masterquery forms also as said in the tutorials as it will basically need a databse for the customers, then i will need to create invoices from services we do for the customers i:e lawn cut etc.
this is where im stuck really, i have tried variuos things but it doesnt seem to be tying into what i want it to do, i think ive tried to overcomplicate it. If anyone could give me any advise on what i need to do to create this very simple database i would really be grateful.
i'm trying to build something that knows when to notify someone that they can call a trade, given 1) a callable date 2) a notice period and 3) the relevant cities
'--------------------------------------------------------------------------------------- ' Procedure : NoficationDate ' Date : 28/03/08 ' Purpose : to calculate the date of notification for an EMTN, given the call date & notice period & cities '--------------------------------------------------------------------------------------- ' Public Function NotificationDate(dtCall As Date, intPeriod As Integer, strSixDigitCities As String) As Date
Dim intWorkingDaysBefore As Integer Dim strCities(2) As String Dim dtLoop As Date
Do dtLoop = dtLoop - 1 If Left(Format(dtLoop, "ddd"), 1) <> "s" And IsBankHoliday(dtLoop, strCities(0)) = False _ And IsBankHoliday(dtLoop, strCities(1)) = False And IsBankHoliday(dtLoop, strCities(0)) = False Then intWorkingDaysBefore = intWorkingDaysBefore + 1 End If
Loop Until intWorkingDaysBefore = intPeriod
NotificationDate = dtLoop
End Function
'--------------------------------------------------------------------------------------- ' Procedure : IsBankHoliday ' Date : 28/03/08 ' Purpose : to see if it's a bank holiday '--------------------------------------------------------------------------------------- ' Public Function IsBankHoliday(dtInput As Date, strCity As String) As Boolean Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM qry_Tass_All_Hols WHERE CITY = '" & strCity & "' AND HDATE=#" & Format(dtInput, "mm/dd/yyyy") & "#", dbReadOnly) If rs.RecordCount > 0 Then IsBankHoliday = True Else IsBankHoliday = False End If rs.Close Set rs = Nothing
End Function
BUT it runs like arthritic toad, it makes a minute per execution and i was hoping to scale it up to 4000 records => 2 days of run time :eek:
any ideas on how to attack this problem...even guesses appreciated, i can try things out and see if they work
I have a list of events and what the out come was on a particular day or date.
To give you some idea, the event is basically number given to a day and the outcome is all possible things that “could happen” and that did happen (so not all 160 possible Outcomes are used all the time).
So it is quite possible to have:
Event 1 (This could be “Monday”) Outcome 12 (This could be “Rain”)
Therefore as you collect your data over time the “Outcome Diff” would = 12
The problem comes when I try to create a report to automatically calculate the “Outcome Diff” this in a Query as the “counter” that should have been added at the time this was created was not done at the time. I also do not mind if this has to involve creating to a table, as long as I get the “outcome diff” calculated in MS Access, I do not mind how this is done. I also cannot use date diff as event mean more than just an index for the day.
Event, Outcome, Date, Outcome Diff 12, 1, 14-Feb-95, 12 (0 to 12 = 12) i.e this is the 1st event outcome of 1 22, 1, 19-Apr-95, 10 (12 to 22 = 10) i.e this is the 2nd event outcome of 1 29, 4, 07-Jun-95, 29 (0 to 29 = 29) i.e this is the 1st event outcome of 29 34, Ect... *This is just a representation with test data.
Just for further clarification: the reason this is need this is to find out difference in "event" days as opposed to just an average.
Hi. I am developing a db for juvenile salmon-focussed fishery survey data and have encountered something of a conundrum which I could use some advice on. Apologies in advance for the length of the post.
Background Juvenile salmon move from freshwater to saltwater. During this transition they require time to adapt physiologically and are thought to seek out nearshore areas with intermediate salinities, or with freshwater overlaying the saltwater. They also experience problems with elevated temperatures.
We are interested in tracking salinity and temperature information at each site where we sample for fish to aid in interpreting our catch results.
Data Collection Our convention is to collect temp/salinity at the surface and at 3-feet below the surface wherever we beach seine (or just at the surface if the site is shallower than 3-feet). However, we use a depth-temp-salinity data-logger attached to the lead-line of a lampera net for openwater sets. The logger provides measurements of depth/temp/salinity every 5 seconds during the set, down to depths of 20-30 feet.
So, for some 'sets' we have one or two measurements of depth/temp/salinity, and for other sets we might have over one hundred measurements.
Problem
1.How best to get that data entered into the db? 2.I'm just starting to get my toes wet with VBA
Ideally, I could directly enter the values into a subform for sets with only one or two measurements, but could instead 'import' the extensive data for those sets where the logger was used. Entering the logger data manually would be ridiculously time-consuming.
Existing DB Setup Records for temp/salinity subform/table linked to other set information by a unique Set_ID field.
Subform for depth-temp-salinity information bound to a dedicated depth-temp-salinity table. The subform is currently viewed as a continuous form.There would be one excel file for each set where a data logger was used, but no excel files for sets where no data logger was used..
My thoughts so far.
Somehow create a subform with the ability to enter up to two records manually or else click a button that imports the data from an excel file. One thought is to pop open a window to navigate to the excel file that contains the data for that set. However, I'm thinking that if I place all such excel files into a particular directory and name them using the appropriate Set_ID number convention, that maybe clicking the button with be able to find the file directly, without navigation required, and bring in the records automatically.
Is this possible? How would I go about creating a subform that provides both an 'import data' button and allows for manual data entry of up to two records?
Can anyone show me a similar example for both the data entry (form) and for how to automate the importing of data from excel files to append to an existing database table?
Aim: The eventual goal of this is to have a command button that could be clicked on the form/subform that would produce a popup window containg a scatterplot graph of salinty versus depth. another button to produce a scatterplot of temperature versus depth. A third button to open a line graph with time on the x-axis, and temperature/salinity series on the y-axis. Before I can get there, however, I need to get the data into the table somehow.
I would appreciate any input/advice on this matter, (especially custom code! ;) ) As, I mentioned, I'm just starting out in VBA and I have a lot to learn. I know how to open a MsgBox, but have no clue on what the command is to open an explorer 'window'.
I hope the problem is sufficiently interesting to generate some response.
Hi, I would like to get your advice on my table setup and relationships for this payroll project. The company is an engineering company with Projects (or construction sites) around the world.
The 'Candidates' are current or potential employees and contractors. There are three main pay categories:
1.Shift-workers All shift workers doing a particular job on a particular project are paid the same rates e.g. all welders on a particular project or site in England are paid the same as each other. For that reason I want to link the pay rates with the job description for these workers. This avoides creating 50 records for 50 welders on the site in England to say that they make £10 an hour normal time (or whatever it is) etc.
2. Contract Contract workers usually get paid a flat rate per hour. As these are negociated on an individual basis I would need to have this information linked to each individuals job (M_CandidateJobDetails).
3. Salary Again this information needs to be input for each individuals job.
For the contract and salary people the pay frequency can vary (weekly, bi-weekly or monthly). So can the currency they are paid in. I haven't got as far as the currency issue yet.
The reason for the one-to-many relationship between M_JobClassifaction and M_CandidateJobDetails is that many candidates can have the same type of job e.g. there can be many employees that in the job classifaction of 'Electrician'. For many of the jobs at managerial level e.g. 'site manager' there will only be one.
I will have a table with the hours worked by each person per week. I can use this for those on shift work or contract to calculate what they will be paid.
One of the main reasons for this database is so that the company can print reports to see what is paid out in payroll for each site and in total (in euros). These will be gross figures and I don't need to take expenses, vacations, bonuses or taxes into account. They other thing we will need to be able to do is assign candidates to vacant positions and change them from one position to another - possibly between different projects.
So basically does anyone have any comments on the relationships, normalisation or anything else. Is this the best way to do it?
I would like to link several Yes/No boxes to corresponding textboxes, so that if there is text in the text box, the yes/no box would automatically be checked, and if there were no text, it would NOT be checked. Is this possible? I hope so, it would prevent me from having to manually check about 3500 boxes.
I created a query that pulls from multiple tables, of which contain the same field name (LastAccessed).
I am getting an error stating that (LastAccessed) "...could refer to more that one table listed...".
What is the correct way to state that I want to pull (LastAccessed) from 'tbldatabases' and not the others. My goal is to only pulls those record whose (LastAccessed) contains 2004. Right now I have "Year([LastAccessed])" in the field line and "2004" as its criteria.
I have two forms, a main form frmProperty and a secondary form "Training Details" you access the training details via a button on the frmProperty form. This is the code for the button.
Private Sub Trainingbtn_Click() On Error GoTo Err_Trainingbtn_Click
Dim stDocName As String Dim stLinkCriteria As String
I noticed however that whenever the user enters data no matter what the "PropertCode" of the main form it was assigning it to PropertyCode = 0 :(
So as a temp fix i have inserted the following code into the GotFocus of a text box that is filled in. This code did not help in the Form_Load section...
ok, let me please ask this question regarding a payment relationship in my database
it will be paid in four ways, cash, creditcard, cheque, paypal
each of these payment types will have their own features..
eg creditcard (name on card, card number)
cheque (cheque date, date cleared)
paypal (username...YOU GET THE PICTURE
so is this below way a good way to store these details, or can i do it with 4 less tables..
http://bb.1asphost.com/antonyx6/untitled2.jpg
if this way is correct, i dont see how each id will be entered.. eg if i enter some cheque details.. will that lead the chequeid to be linked to the paymentid, and the paymentid to the bookingid, and the bookingid to the booking details etc
I am designing a database to store volunteers and what particular function they are volunteering for. I have about 17 areas of volunteering tasks (i.e. Fundraising, Teacher) and at least 3 subcategories for those tasks (i.e. candy fundraisers, nursery school teacher). I want a form that you can enter the volunteer's info and then choose as many areas of interest and as many subcategories. I guess this would be done with checkboxes? Right now I am putting each volunteer task in seperate table (ie. Fundraising table, Teaching Table) and then trying to use combo boxes. But I want the person to be able to choose one or many activities.
Can anyone help me design this or give me a suggestion so that I can query or create a report to list the volunteer and what activities they want to volunteer for. I really appreciate any help I can get at this point. My email is ebbr820@hotmail.com or I will check back on this forum.
I have a form set up where user's type in an explanation of how a claim is being appealed and resolved in a memo field.
One problem, for some reason management doesn't want these explanations to end with a period. But the users keep ignoring our request and keep using the period.
Is there a way that you can code this memo field to where it will allow punctuation throughout, except at the end?
I have a field that contains various text....(It's a note field that allows 86 characters).
I want to go in to the database and add the string "Conversion 2007" to the end of every record. So leave whatever is in there but add in the string. I would like it to add whatever it will fit, in the cases where there is not enough room.
I figured this was somewhat simple, but I haven't found anything yet. Thanks.