1. list of all countries, with one Bogus "All" representing all countries
2. When i select a Country from drop down list, i should get list of States in that Country. Again with one Bogus "All" representing all States in that Country
3. When i select a State from drop down list, i should get list of Cities in that State. Again with one Bogus "All" representing all Cities in that State
I have made severa databses before but im trying to make this one perfect and im curious, when defining tables should you include atributes about an entity that are static?
Its kind of hard to explain what i mean but for example in a shoe shop a staff member gets commision on what they sell (ie 5%) so when producing the table should a coloum be reserved for commision or should this be left out as it will be calculated later on in a querie and if so should i state this in the design section of my database?
any opinions would be greatly received as i have been reading books on sql and ERD's for days and havent been able to obtain any answers
i've got a field in a form where u need to pick gender(in dutch) Now there's an Attention further on and i need the proper attention:(in english= Male=Sir,Female=Madame) Which is in dutch: Male= M = De heer Female = V = Mevrouw, Unknown = O or B = De heer/mevrouw, So my code became: =IIf([Geslacht];"M";"De heer";(IIf([Geslacht];"V";"Mevrouw";"De heer/mevrouw")))
thanks for all ur help in my previous posts.......
ive got this problem, ive got a form that provides mobile details.
on the same form theres an add button and clear button.
all the validations work....... if the forms incomplete then validations do occur.
but the problem is......... if i clear the form (clickin on the clear button) and click 'x' to exit, it brings up one validation, which is the date_issued field validation????? and then exits
why does this validation occur??? how do i get rid of it.............
i want it to exit without any problem....... becoz i have cleared the form
I have been using Excel for many years and have just got to the stage where I need to build a database. I have managed to work out how to import the data ok but within the single table that I will be using I need to have a column which will add up the contents of four other columns.
EG.
Cells in Column T to be the total of cells in the same row from columns C, E, F and G.
Please would someone be kind enough to let me know if this can be done and if so how I can go about achieving this.
I have read as much as I can about using access and have decided it's time to have a play - so please forgive me if this is a silly question. Here goes.
I have a single table - it lists staff by name and staff number and shows 3 qualifications that they may or may not need (yes/no columns).
I have managed to produce queries/reports that show, for each of the 3 qualifications whcih personnel that require that qualification have not achieved it.
I now want to produce a query/report that lists any personnel that are outstanding any of their required qualifications and if so which qualification they are outstanding.
ok guys i know this is really stupid and silly but i cant see for the life of me what i am doing wrong i have a query where i want to only show records between to dates (including first and last)
when i do both or less than one date nothing shows using the code below SELECT Sum(HTRXTBL.HTRX_QTY_1) AS QTY1, Sum(HTRXTBL.HTRX_VALUE) AS VALUE1, DateDiff("d",[Forms]![frmCOMPARISON]![txtDATEFROM1],[HTRXTBL]![HTRX_TRX_DATE]) AS [DAY] FROM ITEMTBL INNER JOIN HTRXTBL ON ITEMTBL.ITEM_NUMBER = HTRXTBL.HTRX_ITEM_NUMBER WHERE (((HTRXTBL.HTRX_REC_TYPE)="ITMSALE") AND ((HTRXTBL.HTRX_TRX_DATE)>=[Forms]![frmCOMPARISON]![txtDATEFROM1] And (HTRXTBL.HTRX_TRX_DATE)<=[Forms]![frmCOMPARISON]![txtDATETO1])) GROUP BY DateDiff("d",[Forms]![frmCOMPARISON]![txtDATEFROM1],[HTRXTBL]![HTRX_TRX_DATE]);
when i do greater than the from date it this code below works SELECT Sum(HTRXTBL.HTRX_QTY_1) AS QTY, Sum(HTRXTBL.HTRX_VALUE) AS [VALUE], DateDiff("d",[Forms]![frmCOMPARISON]![txtDATEFROM1],[HTRXTBL]![HTRX_TRX_DATE]) AS [DAY] FROM ITEMTBL INNER JOIN HTRXTBL ON ITEMTBL.ITEM_NUMBER = HTRXTBL.HTRX_ITEM_NUMBER WHERE (((HTRXTBL.HTRX_TRX_DATE)>=[Forms]![frmCOMPARISON]![txtDATEFROM1]) AND ((HTRXTBL.HTRX_REC_TYPE)="ITMSALE")) GROUP BY DateDiff("d",[Forms]![frmCOMPARISON]![txtDATEFROM1],[HTRXTBL]![HTRX_TRX_DATE]);
:( i cant see what is different or missing help please
I feel like a goober for even asking this, since I've been using Access for three years now for work-related databases, but this is actually the first time this has come up and I can't, for the life of me, figure it out.
I need to find out if there is a way to copy something (a year, for example) and paste that one thing onto multiple rows within one column of the datasheet (Year Attended, for example.)
I don't want to have to type in the year 1,296 times; I'd like to see if I can highlight the portions of that column I want (all of the people who attended in 2005) and paste "2005" into all of the highlighted cells at once. In Excel, for example, you can copy something, highlight an entire section, and it will paste into each cell.
This is executed by an event in another form that loads the new form and starts dumping in values. For some reason I'm suddenly getting "Object doesn't support this property or method. 'Object' is simply a textbox that is enabled, but is also locked altho to my knowledge this isn't a problem. It's late and I've been working for hours so this may be something simple I've overlooked...need to step away for a while.
I have the following fields in a query: "Employee_number", "shiftname", and "shiftdate" And I have the following code on the criteria of "shiftdate": >= dateadd("d",-7,Date()) so that only records from the past 7 days are displayed which is fine, however when I run the query it displays the following
which is not quite what i want.....Is it possible to make it only show the same shiftname with the same shiftdate just the once instead of showing it several times for each employee?
I have written the following query for use with my Automatic Weather Station
10 Min Wind Direction: Val(IIf((([Date]="11/07/2006") And ([Time text]>=1600) Or ([Date]>"11/07/2006")),[CR10X AWS]![Field6],""))
Basically I had some data from 1300hrs on 7th July until 1600hrs 11 July that was wrong and I needed to 'null' the data reading - the above works fine showing a value of '0' for the incorrect data between these times / dates and all the correct values are displayed since then however, since 01 August the field nows shows 0 again - any ideas why ?
I have several queries in access that are linked to excel and when i update the excel worksheet the query information appears in a tabular format, which is fine. I also ahve a master table in excel which is supposed to update using the info imported from access. This table is based on fixed cell refernces but whenever i update excel with the access info, the majority of the excel fixed cell refernces change to random numbers? Any ideas?
My question is essentially about the saving of information into the underlying database. I have been searching the forums and havent had any luck in finding what I wanted. There were a number of similar threads but I couldnt find any replies which could really point me in the right direction.
1. I am trying to prevent the underlying data from being changed until I click the save command button. It cant seem to work since even before I click the save button, the record is already written.
I tried using Before update cancel = true but that prevents me from moving away from the control. Also, I tried using edit locked but that still records the changes once i made it on the form.
What is the most common way of people saving records upon confirmation? And how do you prevent automatic recording? Any advice would be very much apperciated.
I have done a bit of reading and research on the 'tag' property in forms and tried to set some code. Now I am all muddled as to how to do it and what comes first?
What I am trying to do is if the condition in one field 'time required' is yes then I would like a whole lot of bound controls (fields) not to appear so that the user cannot enter any information by mistake.
The code is below;
Dim ctl As Control
For Each ctl In Me.Controls
If Me.TimeRequired.Value = "-1" Then If Me.Tag = "Fermyesno" Then
I am trying to populate a record in a table "M_Paint" using an unbound form. I cannot get it to work. I am posting the code below for reference. I can post the database if any one will like to see. The complicated part is that I am trying to generate a text value for one of the fields in the same record based on some of the selections made in combo boxes in the same form... (it does sound complicated, doesnt it!) Please feel free to ask questions; Thanks a ton! Quote: Private Sub cmd_ip_catcode_Click()
'Error Handling On Error GoTo cmd_ip_catcode_Click_Err
'Declare Variables Dim db As DAO.database Dim qdf As DAO.QueryDef Dim DAOrs As DAO.Recordset 'Variable to collect selections from list boxes Dim strcataloguecode As String Dim strnumber As String Dim srtcolor As String Dim strbasemetal As String Dim sSQL As String
' Identify the database and assign it to the variable Set db = CurrentDb t = "M_Paint" Set DAOrs = db.OpenRecordset(t) With DAOrs .AddNew .Fields("Catalogue_Code") = strcataloguecode .Fields("Base_Metal") = Me.cmb_ip_basemetal .Fields("Paint_Type") = Me.cmb_ip_painttype .Fields("Color_Family") = Me.cmb_ip_colorfamily .Fields("Metallic") = Me.cbx_ip_metallic .Fields("Surface_Quality") = Me.cmb_ip_surfacequality .Fields("Number_of_Coats") = Me.txb_ip_numberofcoats .Fields("Supplier") = Me.txb_ip_supplier .Fields("Product_Name") = Me.txb_ip_productname .Fields("Color_Name") = Me.txb_ip_colorname .Fields("Color_Number") = Me.txb_ip_colornumber .Fields("Top_Coat") = Me.txb_ip_topcoat .Fields("Pre_Finish_I") = Me.txb_ip_prefinish1 .Fields("Pre_Finish_II") = Me.txb_ip_prefinish2 .Fields("Finish_Comments") = Me.txb_ip_finishcomments .Fields("Size") = Me.txb_ip_size .Fields("Number_of_Samples") = Me.txb_ip_numberofsamples .Fields("Compilation") = Me.cbx_ip_compilation .Fields("Location") = Me.txb_ip_location .Fields("Date_Received") = Me.txb_ip_datereceived .Update End With
' Getting the initials from base metal table strbasemetal = "SELECT L_Base_Metal.Paint_Code FROM L_Base_Metal" & _ "WHERE (L_Base_Metal.Base_Metal) LIKE [Forms]![F_Input_Paint]![cmb_ip_basemetal];" Debug.Print
' Getting the numbers from record Number strnumber = DAOrs("Record_Number")
' Getting the color number strcolor = "SELECT LP_Color_Family.Paint_Code From LP_Color_Family" & _ " Where (LP_Color_Family.Paint_Color) LIKE [Forms]![F_Input_Paint]![cmb_ip_colorfamily];" Debug.Print
' Inserting the Catalogue Code into the table strcataloguecode = " & strbaasemetal & '-' & strcolor & '-' & strnumber & "
I'm in the Military, and I have a form that shows everyone's personal and training information, and also shows if they're deployed to another part of the world. If they are deployed, it will be shown in a drop down box... I have another drop down box that needs to show where they are deployed to. Here's the problem, I need for this one to be self populating so that if the location is not currently listed, then it can be added. Here's where I'm at so far: I have a table named "Location" and it has the fields "Location Name" and "Auto number". My field where I want this to be displayed is named "Where?" (as if asking the question, Where is this person deployed?) This is the code I'm using:
SELECT [Location].[Location Name] FROM Location AS [Where?] ORDER BY [Location Name]
It keeps giving me the error message: The SELECT statement includes a reserved word or an argument name that is misspelled or missing or the punctuation is incorrect.
Could someone please tell me what I'm doing wrong?
I need to query information from a table. I need to work with 2 fields. One field is Customer Number the other Field is Notes. Each time a note was entered a new record was created. I want to list the customer and all the notes. I will then use this in another query and report. Is there any way to convert the many records to a record for each customer with many notes. I hope this makes sense. Jeri
Right, i have access 97 on my pc, yeah i know its old skool and ishould really upgrade, but thats expensive, and im only a student.
Basically i wanna create a stockfile/invoicing/sales log/purchase log for my business, but im getting completely lost. i figured best way to start out in the database was to get a stock file sorted out. but thats proving to be problematic before i even start!
what i would like to do is have several categories and then further sub categories and sub sub categories.
____drink >>>>____soft >>>>>>>>____water >>>>>>>>____pure fruit juice >>>>>>>>____squash >>>>>>>>____fizzy/soda >>>>____alcohol >>>>>>>>____beers >>>>>>>>____wines >>>>>>>>____spirits
but when entering data , say im entering product details of a beef spare ribs, if i select "food" in one column i want it to only allow me to select the subcategories within "food" (i.e meat, bakery or dairy) and then once ive selected that i then select what type of meat, as opposed to having a whole list of dairy, bakery, meat, soft and acohol all coming up. and same with the sub-subcategory.
cheers for all your help, if u wanna chat further you should find me on msn!
And another table country: id that has the values: 1,4,5
Basically is there a query that can be written for me to check if ALL the countryids from the country table will return an artist, and if not can it let me know. For example obviously there is no countryid with 1 in the video table so Im not interested in that batch in the country table. I know I can just execute the query 3 times to see if a result is produced but what if the country table is massive (btw the country table is generated dynamically using xml). Any help on this would be very mch appreciated
I am very new at doing Access database. I have read stuff on it but I just keep confusing myself. I am trying to build a master database that holds all information on our teachers. Such as staff development workshops attended, keys that have been issued to them and so on.
I have three tables. One has the teachers information such as name, ss#, address etc... The other table will have the staff development title and dates and the third table will be a key database.
I want to be able to open the database in a switchboard, which I have done before and be able to add information in a particular teacher's file such as keys issued or returned, staff workshop just attended.
I have attached a sample of what I have started. Could you lead me in the right direction? Thank you.
I have a database with a table containing drawings recieved. Each drawing can have many actions, first action is sender detail, date, and letter ref. Second action is sender detail, date, letter ref and status (ie acceptable / not acceptable) I can run a query which looks for all drawings with a status of not acceptable but i then lose info on sender letter ref or I can run a query which gives the senders letter details but for all drawings, not jut those not acceptable. What I want is a query which looks at all docs sent by C1 AND not acceptable.
Here's a challenge... i thing that there's a very silly method to prevent this from happening but unfortunately i can't figure out how... there's the challenge...
we have a car that makes a distance from 01/01/2007 and returns 30/01/2007 and the same car makes another distance from 12/01/2007 and returns 15/01/2007 that's not gonna happen if the prog checks the dates... but till now was checking the 1st date (for ex. the from or the to) so if the car leaves and returns during another wayout the drivers gets more money and the truck legaly should be in a certain distance this time and not in a second one... PLEASE HELP ME!!!! MY BOSS IS LOOSING MONEY AND I'M THE ONE THAT I HAVE TO FIND THEM!!!! :eek: :eek: :eek: :confused: :) :)
Form -OrderID ......... and then I want to add a drop-down to select the clients name and have all of their address and phone information populate in separate text boxes automatically. I created a combo box with the Client Query as the record source. Now I am trying to add a text box for the clients company using =DLookUp("Company","[Client Lookup Query]","Client=" & Company) but instead of returning the company it returns the error #Name?. Can anyone see what the problem is? What am I doing wrong...
BTW,.. this would be my first attempt at Dlookup. Thanks
I am a little confused as to when exactly the forms_current event is called. I have a form with a text box called Last_Name, bound to the "Last Name" field in the form's table. I have the following code in the FormsCurrent event: Dim test1, test2 As String test1 = Me.recordset.Fields.item("Last Name").Value test2 = Me.Last_Name.Value
Why is it that when I move from record to record in the form, when this event is called test2 contains the name in the current record, but test1 contains the name in the previous record?