Search results

  1. D

    Looping through a recordset

    For each record in your recordset, you can certainly assign the value of rs.fields![fleetlocation] to a variable (providing it's Not NULL) and by the looks of it a string variable seems appropriate. Then do your logical tests on the value of the variable, but when you come to edit/update, you...
  2. D

    Question Access 2007 Multiple Pie Charts how to get consistent color slices

    I've not tried to manipulate chart objects, bit imagine you'd have set up your source data so that it is consistent in terms of the order in which "agree, strongly agree, neither agree nor disagree, disagree, and strongly disagree" values appear, perhaps you can add some sort of sortID to these...
  3. D

    Code to sort table

    The only comment I could make is that even though you start the process by running a query ... DoCmd.OpenQuery "qryTranHistSort", you don't state the details of how this query works but unless this query creates a new set of ID's, it doesn't guarantee that when you open the recordset ... Set...
  4. D

    Question Mechanic Template?

    "I am trying to wrap my head around access" Just try to think in terms of how the tables will relate to each other ie how will a customer table relate to a vehicle, could that customer have more than one vehicle, if so then there will a one to many (customer to vehicle) relationship and you will...
  5. D

    Timesheet access Project

    I can't visualise your table structure and whether you enter multiple records for hours worked depending on the rate or whether your tbl_EmployeeHours has separate fields for the different rates and number of hours worked in each. If the former, I think you'd need to think of 3 different reports...
  6. D

    SQL String does not retrieve Primary key newly added record

    It may be that "SELECT @@IDENTITY as [ID]" although this can be used through the SQL server query window, it does not work through the MS Access Environment. You could try running the INSERT statement: insert into tblPerson([firstname],[lastname]) values .... and then run a separate strSQL =...
  7. D

    Passthrough Code in Access

    Running a simple SQL statement such as TRUNCATE table will work because you are dealing with only one database object on the SQL server side, you set your connection and execute, no problem. The problem comes when you try to execute a sql statement that takes records from access to sql server, I...
  8. D

    Update Access Database from VBScript

    I've worked with scheduled tasks before that have opened an Access database, but not with a task that calls a .vbs file. Where does the value(s) of "ID # of some tasks that will be run" come from? There may be another way to do this David
  9. D

    Help needed to understand my error

    Some of the key tables do not have Primary Keys defined, these are essential to a relational database. You might want to reconsider the design of your table structure David
  10. D

    Update Access Database from VBScript

    From what application are you trying to connect to an Access 2010 DB? David
  11. D

    How to update name fields from related table along with autonumber

    If you already have name details in the PersonalDetails table, it wouldn't be considered good practice to have the same details in the Application table in a relational database, all you should need is the StudentID. You may want to reconsider your database design David
  12. D

    Display Query Results Sensible (Filter in LstBox?)

    This is not something you can do in a straightforward manner because basically you need to examine the latest record for each machine, this itself is easy enough using a GroupBy query on the Inspections table, group by MachineID using DMax on the date or DMax on the Inspections ID if this is an...
  13. D

    Help With a Custom Module that Calculates Price

    can we see the QUERY that you're calling this function from David
  14. D

    Insert into Statement, using data from form control

    try this DoCmd.RunSQL (INSERT INTO tblAdjustment (adjType, adjReason, fgID, adjQTY) VALUES('Finished Goods', 'Produced', '" + Str(Forms!SubFormBatches.fgID) + '", '" + Str(Forms!SubformBatches.batchPackedQTY) + "')") This should work when both fgID and batchPackedQTY are Integer/Long data...
  15. D

    A Question about printing

    when you say "cannot print on that card printer" what do you mean exactly. When you try to print are you able to select that printer, if so what happens when you try to print. It may be that this network printer is not installed on your machine David
  16. D

    Dynamic Query change field selections

    from your error above, I'd say that one of the values is a string value, try using CInt/Clng or CDbl if decimal strSQLStaticExpr1 = (1 - CInt(Forms![Print_Processing_Report]![SRespTol])) * CInt(Seed_Test_Item_Table.[Response_Value_CH2]) As for generating a dynamic query, you could try using...
  17. D

    How to import from excel to existing table in access

    try importing the new data into a temp table first, if the recordcount > 0 then, use Docmd.RunSQL("DELETE CardDetails.* FROM CardDetails") then run an append query to move the new data from temp into CardDetails table David
  18. D

    Does Access 2010 cache locally from Sql Server 2008R2?

    No way this should be happening. Are you sure the front-end is linking the right back-end database. The only way I was able to convince the accdb that the data was changed was to open up the linked sql server table in the access app and make the changes there - only then did the access app...
  19. D

    How to import from excel to existing table in access

    You'd need to do this in several steps to locate a file, use the Application.FileDialog(msoFileDialogFilePicker) method to clean out old data use Docmd.RunSQL("DELETE CardDetails.* FROM CardDetails") to import the located file use TransferSpreadsheet method You may want to validate each step...
  20. D

    Saving invoice

    Once you have your table structure correct, you can create a forms to generate an order. Select customer, select product line, enter quantity and other details, then repeat for as many products/services in that order. For the invoice itself, just design a report that pulls in all the order...
Back
Top Bottom