My form uses the city table as a drop down look-up field. In the form it show’s up correctly by showing the City Name only.
The problem is that I have a command button that looks up the city in the form as part of an address lookup for Mapquest, but the value it retrieves is the numeric City_ID and not the City Name. How can I fix it to see the correct column?
I am a buyer and I'm attempting to create a query in Access 2003 that will list all of my vendors (20 in total) and their top 10 selling sku's. Here are the fields I am using:
Buyer_Code Supplier_Number name Sku_Global OEM_Number Part_Description_English Status C_Last12_SLS_QTY
I have created one Query including all of the above fields as well as the following field, "XP1: GetTen([Supplier_Number])" In this query I have set "Supplier_Number" to sort ascending and "C_Last12_SLS_QTY" to sort descending.
I then created a module, written as follows:
Option Compare Database Option Explicit Public wSUPPLIER_NUMBER As String Public wNum As Integer
Function GetTen(SUPPLIER_NUMBER) As Long If wSUPPLIER_NUMBER = SUPPLIER_NUMBER Then wNum = wNum + 1 Else wNum = 1 End If If wNum > 10 Then GetTen = 0 Else GetTen = wNum End If wSUPPLIER_NUMBER = SUPPLIER_NUMBER End Function
I then created a second query with all of the above fields, and the criteria for the XP1 field as ">0"
As far as I can tell, this should bring me back a list with the first 10 rows for each of my Supplier numbers... unfortunately it is for some and for others it's bringing back more than 10 rows. The other problem is that it seems to be picking random rows to bring back, and not just the first 10 (which because in query1 I set the C_LAST12_SLS_QTY field to sort descending, should be my top 10 selling sku's).
Does anyone have any idea as to what I've done wrong? I'm pretty new with Access so I may be missing something pretty simple.
This is at least the 3rd time I've come across something that is, to me, an extremely serious bug in Access. Anyone else seen this, and anything I can do to avoid it?? In a query, I ask for the values from Field A. The query returns the values from Field B, but still calls it Field A.
This is in a fairly complex query. If I delete one particular field from the query, the bug disappears. If I put that field back, the bug returns.
Here is my current query: SELECT ByPN_1.PartNumber, ByPN_1.LostPerSetup, ByPN_1.ActualMachine, ByPN_1.PermQty, ByPN_1.FirstOfFeederSize, ByPN_1.Leaf1, ByPN_1.FirstOfType, ByPN_1.NonPerm, IIf([nonperm]*[concurrentsetups]<1,1,CLng([nonperm]*[concurrentsetups])) AS QtyIfDed, [nonperm]*[setupsperday] AS MaxLoadsSavedPerDay, [qtyifded]*[setupsperday]/[concurrentsetups] AS DedLoadsSavedPerDay, IIf([maxloadssavedperday]<[dedloadssavedperday],[maxloadssavedperday],[dedloadssavedperday]) AS LoadsSavedPerDay, [loadssavedperday]*[laborrate]*[loadunloadperfeeder]*250/60 AS Labor_Annual, master_attr.STD_COST, [loadssavedperday]*[lostpersetup]*[std_cost]*250 AS Parts_Annual FROM (ByPN_1 LEFT JOIN FeederCost1 ON (ByPN_1.ActualMachine = FeederCost1.Machine) AND (ByPN_1.FirstOfFeederSize = FeederCost1.Size) AND (ByPN_1.FirstOfType = FeederCost1.Type)) LEFT JOIN master_attr ON ByPN_1.PartNumber = master_attr.ITEM WHERE (((ByPN_1.PartNumber)=107573));
HEre's the pertinent part of the record from BYPN_1: PartNumberLostPerSetupFirstOfFeederSize 107573 3 12X4
But here's what the query returns: PartNumberLostPerSetupFirstOfFeederSize 107573 12X4 12X4
Now, if I just delete the "parts_annual" field from the query: SELECT ByPN_1.PartNumber, ByPN_1.LostPerSetup, ByPN_1.FirstOfFeederSize, ByPN_1.ActualMachine, ByPN_1.PermQty, ByPN_1.Leaf1, ByPN_1.FirstOfType, ByPN_1.NonPerm, IIf([nonperm]*[concurrentsetups]<1,1,CLng([nonperm]*[concurrentsetups])) AS QtyIfDed, [nonperm]*[setupsperday] AS MaxLoadsSavedPerDay, [qtyifded]*[setupsperday]/[concurrentsetups] AS DedLoadsSavedPerDay, IIf([maxloadssavedperday]<[dedloadssavedperday],[maxloadssavedperday],[dedloadssavedperday]) AS LoadsSavedPerDay, [loadssavedperday]*[laborrate]*[loadunloadperfeeder]*250/60 AS Labor_Annual, master_attr.STD_COST FROM (ByPN_1 LEFT JOIN FeederCost1 ON (ByPN_1.ActualMachine = FeederCost1.Machine) AND (ByPN_1.FirstOfFeederSize = FeederCost1.Size) AND (ByPN_1.FirstOfType = FeederCost1.Type)) LEFT JOIN master_attr ON ByPN_1.PartNumber = master_attr.ITEM WHERE (((ByPN_1.PartNumber)=107573));
Now the query returns what I expect: PartNumberLostPerSetupFirstOfFeederSize 107573 3 12X4
I use this to record piece counts and weight of items of freight that I pick up in Boston ( all seafood by the way) Anyhow here is the problem I'm having. Anytime I create a report one of my field names (RECIVER) keeps displaying as a unique number. Example, "New Enland Fish Market" display's as "14" which is its auto number assigned to it when I created the Table of recievers.
I have a query[view] where I have six employee numbers, I left join these to an Employee table to retreive the names.
I've created a report that uses this query/view as its source. For some reason my report keeps making all six name fields refer to the same control source Employee.Name and not Employee_1.Name, Employee_2.Name, Employee_3.Name,.... respectively.
In design view everything looks fine but when I switch to report view the switch happens, it displays the same name in all fields. When I switch back to design view all of the fields have changed to the same control source.
why this is happening? My tables are in a SQL server.
I'm trying to create a query that will sum the total time of a specific field. It seems to be doing it, however the value is off by by a couple minutes on all my examples.
Table
- BusArrivalTime - BusDepartTime
Query
In my Query I'm making a new field like this. It correctly figures out the difference.
Next I'm displaying that Query information inside of a Report by putting this in the Text Box on the Report. It correctly displays the time in the Hours/Minutes format.
=[BusWaitTime]60 & Format([BusWaitTime] Mod 60,":00")
Lastly, I'm using another Text Box on the Report to Sum the Grand Total of the Wait Time for all my records. Here is what Im putting in the Control Source
=Sum([BusWaitTime])60 & Format([BusWaitTime] Mod 60,":00")
...and it's summing my records, but the value is off by a few minutes and I cant figure out why.
In my example, I have 3 records with times of 3:14, 1:35, and 3:20. It should be totaling a figure of 8:09 but its coming to 8:14 instead.
all of a sudden now, when i open my form, its not displaying any of the previous data that i stored in it!! All the data is still in the table, and when i add data it goes into the table!! I checked properties and the record source and everything is ok there, what have i done wrong guys...HELP!!!!
I purchased a copy of Office 2003, on Ebay, for less than half the price it normally sells for. I created databases, which work well on my computer. However, when I copy them over to the office computer from my computer, via Flash memory stick, the program does not run. The message seems to indicate a problem with registration. When I installed Access, it asked me for a registration key, which I did provide. After that it worked-not activation process. Does this mean that you can only use the computer you created the database on to run it, or that I do not have a proper version of Access 2003? I cannot transfer, from my home computer, to the office computer. Is this Microsoft paranoia again? Subsequent uninstalls and reinstalls of the program did not ask for the installation key. What should happen? I would like to resolve this major problem and your help will be greatly appreciated. The program is flaky. Also, Switchboard does not work-must use Option Box.
These questions most user must know about initial installation and copying mdb files to other computers -please reply.
i have a string variable denoted by cui and i need it to take value from table tblPersoaneJuridice from field CodUnicInregistrare. CodUnicInregistrare and NumarInregistrareRegComertului is text.
cant get it running. i got the same query running made in the querybuilder, but somethings change, so i need to adjus it in vba. But it doenswork, and get a type error
DoCmd.RunSQL "INSERT INTO tblAccessLog " _ & "(DateLoggedOut, TimeLoggedOut) VALUES " _ & "(#" & Date & "#,#" & Time & "#) WHERE " _ & "(LogID = '" & LogsID & "');"
Could anyone possibly tell me why this isn't working? Probably something stupid i've done bus still.
When i run it, I am getting the error message "Query input must contain at least one table or query" yet i've told it to use tblAccessLog so i'm just confused.
i've posted it as the sql string is built in the code
i get a 'catastrpohic error' when running it from vb like this and when i build put the string into a query and run it through the access user interface it worrks
I made a number of changes to a DB that was working fine (normalised further). So what's wrong? I have a number of forms (for my sample DB I have stripped down to just one, if I can resolve for this I can apply to others).
qryENTRY_COMPUTERS ENTRY COMPUTER FORM
The user adds a new computer then selects the Computer Make (qryLOOKUP_COMPUTER_SUPPLIER) & Computer Model (qryLOOKUP_COMPUTER_MODELS).
This now returns error 'recordset is not updateable'.
The query on which the form is based is incorrect (qryENTRY_COMPUTERS). Previously I was able to add tblSupplier & tblSupplierProducts to the query then add field ProductDescription fom tblSupplierProducts to the query. This allows users to select a value from cboComputerModelID (ProductID), field ProductDescription then displays the related descriptive value for the ProductID selected (value remain on screen when user naviagtes between records.
I have attached a sample database (access 2002-2003 format).
I am sure the answer is staring me in the face but I have now spent hours trying to resolve!!
Help very much appreciated. Phil.
Update: One difference I can see is that on the query 'qryENTRY_COMPUTERS' where i have added tblSupplierProducts & tblSupplier the join properties are in reverse i.e. Left Table Name = tblSupplierProducts Rigth Table Name = tblComputers Left Column Name = ProductID Right Column Name = ProductID ????
I am trying to create a form that has an unbound text box which row source is a field in a table. I have created a subform that gets the records from another table.
Both tables are linked in a one to many relationship. When a user selects a record in the cmbo box i want the table to show only those records which are related.
This obviously didnt happen. So i changed the subform instead of a table as its source but a query, then in the criteria of a query just set it to look at the cmbo on the form. After the cmbo was updated i got the subform to requery.
This worked fine, but i was unable to make any changes or updates but with no particular error.
When inserting a subform using the wizard i do remember coming across a section of a wizard that asks me if i would like to tie in the subform with something on the form. However this part of the wizard just doesnt show. Maybe i was using a different version of access for this wizard?? i am currently using Access XP.
I'm trying to mess with a combo box where when one user selects a value a form opens up. This is the code I'm typing in but I keep getting a syntax error
DoCmd.OpenForm(Phone,[View As AcFormView=acNormal],[DataMode As AcFormOpenDataMode=acFormAdd],[WindowMode As AcWindowMode = acWindowNormal],[OpenArgs])
Hello once again. I have been working on a small database that records all IT records (Desk Info / Software / License Info / Hardware etc...) Somebody out there might even find it useful!! Will post to DB forum when working :)
Where to begin. I thought it would be a good idea to normalize a little more........(still not 100% but an improvement). I seperated Software/License information. I now have tblSoftware & a tblLicenseDetails.
Basically the clux of it all centers around a form 'frmDeskSetup'. You can search via three methods (Desk ID / User ID or Computer ID). I would like to amend the Installed Software Form (last form on frmDeskSetup) to include the License Information.
I have also tried to create a query linking tblComputerSoftware tblSoftware + tblLicenseDetails. My idea was to create a form that would allow users to Add Software/ Add a License for that Software and then allocate the licensed software to a computer all from one form. The query run OK but would not allow data entry via the form!!
Sorry for the length of this post. I have attached a stripped DB for forum in Acess 2003 format. Thanks in advance, Phil.
What is wrong with this line? I am entering it in the following query:
ERName Group By Department Group By Date of Call-In Group By Type of Call-In Group By Count:ERName Count
The other thing I tried is just doing another query based on the above query and doing a totals (sum) line on Count:ERName. That doesn't work, it prompts me for count (as if that is a parameter I want to choose.
I am still learning access- I am hopeful someone does not mind helping me...no matter how easy or simple this may be. I will do my best to describe what I am trying to do.
I am creating a system admin database- starting from scratch and am willing to start over.
I would like to create 2 forms that work directly with the appropriate tables.
Table 1 (host/IP): Hostname IP address User - uses a drop down already created System - uses a drop down already created
Table 2 (system updates): Action- uses a drop down including install, remove, etc... Software- uses a drop down to select from including virus, system updates Date updated Comments
Form 1: -new record button (to enter new hostname record and IP associated) -find button -save button -Exit (database button) -Delete Record button) -hostname -IP address -user (drop down to change user if necessary) -System (drop down to select laptop, workstation, etc.) -"Add/update patch" button (which I would like to link to form 2 showing only the records for the selected host/IP on form 1) - "view all updates for this system" button (within last week or month)
Form 2: - Clear or undo button (which will undo any field entered by mistake on this form) - Save button - Exit (to main form) button - Hostname field which matches what is on form 1 - user field which also matches what is on form 1 - Next, there are four separate lines (as seen below)- each with the appropriate links to table 2. The purpose of the four lines is if the admin has four separate updates to be entered, they can do it on one page, click save and each separate will be saved and accociated with that hostname, IP. 1. Action - Software - Date Updated - Comments 2. Action - Software - Date Updated - Comments 3. Action - Software - Date Updated - Comments 4. Action - Software - Date Updated - Comments - System Admin field - this is to show who did the updates for the selected hostname/IP
Now, I seem to be okay with form #1 (except the "view all updates..." button) Form #2 is giving me a fit. I seem to be having problems populating all the hostname records that have been entered. Also, the four lines are not working independently.
Is it possible to have the date update field automatically update when action or software is updated/selected.
Perhaps I have the second form set up wrong due to the relationships or primary keys or I just did not configure the form correctly.
Sorry for the long message- I hope someone can help straighten me and/or this database out.
I purchased a copy of Office 2003, on Ebay, for less than half the price it normally sells for. I created databases, which work well on my computer. However, when I copy them over to the office computer from my computer, via Flash memory stick, the program does not run. The message seems to indicate a problem with registration. When I first installed Access, it asked me for a registration key, which I did provide. After that it worked-no activation process. Does this mean that you can only use the computer you created the database on to run it, or that I do not have a proper version of Access 2003? I cannot transfer, from my home computer, to the office computer. Is this Microsoft paranoia again? Subsequent uninstalls and reinstalls of the program did not ask for the installation key. What should happen? I would like to resolve this major problem and your help will be greatly appreciated. The program is unreliable. Also, Switchboard does not work-must use option box instead.