Search results

  1. E

    Listbox question

    short answer -> no long answer -> you could but you'd need a requery... not worth it If the first field on the list box is a) not hidden and b) not the unique id (PK) field then you need to look at this first. Once you have the unique id as the first column, you can select it with the mouse...
  2. E

    A little help plz!

    If you don't mind not having the first field in full you could probably do: select left([field 1],9) as smlfield1,[field 2],avg([field 3]) as AverageCost From table group by left([field 1],9),[field 2] Check the avg function (average) or build in the query builder... Vince
  3. E

    Filtering Out Duplicates while updating Table

    Well... You could, import the data to the main data tables then - run the duplicates wizard - create a new table from the data and use the unique value/records/distinct to get rid of duplicates. You could import the data to an import table (delete the records held in it already if there are...
  4. E

    I'm a fool for your querying

    NZ = function that if the value is null it is replaced with the specified default. (see help files) The above is the Sql statement, if you copy the table layouts, create a query, close the adding tables window, change the view to sql (from builder/dataview) and paste the sql statement in then...
  5. E

    Querying by vba

    The option I would choose... - create the sql statement to return all the fields with no criteria - change to Sql view and copy the text - in vba, use a string set to the sql you just copied (take off the semicolon at the end) - using vba to check if the textboxes have anything in and add the...
  6. E

    I'm a fool for your querying

    tblEmployees EmployeeID - auto (PK) Forename - text Surname - text PositionID - number (FK) tblPositions PositionID - auto (PK) PNo - (text or number) PTitle - text Then a query: Select tblPositions.PNo, tblPositions.Ptitle, nz(tblEmployees.Forename,"") as EForename...
  7. E

    Help with tick box

    Well either a field on the top/main table with a status (uses a lookup to status's held in a lookup table) or you have multiple fields on the main table as boolean/tick boxes. Vince
  8. E

    Disappear Relationships

    Had a thought, select each table and delete (in the relationships) then click show all. Hmmm might not work tho Vince
  9. E

    Disappear Relationships

    Not sure. Try right mouse on the relationship window, pick "show all" If they really aren't there, then its possible that whilst importing it overwrote the relationships... Vince
  10. E

    capturing current user's username

    You haven't got a log in form set up so the users have to login before they get access to the db???? As to the assign, you need to check whether there is data already in the field - if not then assign the environ$... As to the change, check with either the network people or by starting at 1...
  11. E

    Run-time error '3251'

    For Each numeriSchede In Scheda.ItemsSelected strSelectedList = strSelectedList & iif(len(strselectedlist)>0,",","") & "'" & Str(Scheda.ItemData(numeriSchede)) & "'" Next strSql="Delete * from [Scheda Inserimento] where [Numero Scheda] in (" & strSelectedList & ")" currentdb.execute strSql...
  12. E

    Open text and save as csv format

    I may be a little thick here... You want to open a text file in Excel, save it as CSV then import this to Access?? Why not just import into Access, using code, parsing the text, and putting it into an import table, then fiddle with the records afterwards? Vince
  13. E

    Field survey help

    Need a table something like: tblRecordedVisit RecVisitID - auto - pk ItemVisitedID - number - long << this is the item/site/machine you decide VisitedByID - number - long << employee who investigated VisitedAt - date/time Notes - memo This can either be entered by you or by the employee...
  14. E

    Code wont retain link

    Hi, I've only skim read the code as I wrote something similar before which worked for 97 and 2k on win98, 2k and nt. My suggestion: Store the path in a table and get the unc path as well. On loading/reconnection, pull the unc path, check all local drives and match then delete all tables that...
  15. E

    Calculating Percentage In A Query

    Eh? Whats that?? You sum the field, and filter it in the having clause... Or the Where clause (as I said you'd need to look at that) Whats the Sql statement you have at the moment? Vince
  16. E

    Calculating Percentage In A Query

    The status field in my query is the attrib field you posted... As to the calculations you could in theory get away with something like the following... Might need to be looked at further. Select [table].[item],[table].[count] as [Pass],[subqTotalCounts].[TotalCount]-[table].[count] as [Fail]...
  17. E

    Help!!!Query too complicate

    100 fields - scary!!! Well the list box is filled via an sql statement, so instead of displaying it (listbox) just send it to the temp table. all you need to do is: 1) delete all records in the temp table (sql like:> delete * from tblTempTable) 2) for each listbox, change the select Sql into...
  18. E

    Table design and relationships

    Hmm not sure if this is a good suggestion or not... tblEmployees EmployeeID - auto - pk <<other fields>> LastSignedInDate CurrentStatus tblReferrals ReferralsID - auto - pk EmployeeID RefByCompID RefDate tblJobs JobID - auto - pk CompanyID An Archive table or mdb to hold old data (this of...
  19. E

    Help!!!Query too complicate

    Just let me clarify this.. there are 17 tables like TableLocationSheet (same fields just different language and other info) ? Can these not be put together into one huge table? TableLocationSheet TableLocID - PK SiteNo - long (connected with TableSiteSheet) Language (text) << Put these into...
  20. E

    Data is there, but can't see it in the form.

    Usually use listboxes, first column is hidden and holds the unique ID, then the form below it for editting/creating. In this case I've run up a form, its bound in places, but you can amend that if you so desire :) See attached for example :) Vince
Back
Top Bottom