Search results

  1. K

    function - can a string be an optional variable?

    I am amending some Code I found online for an audit table, I need to store additional information in the table that is associated with some forms but not others. I have researched about putting optional variables in, but I read this only works with the type VARIANT. Is there a way to make a...
  2. K

    How to better handle duplicate entry error

    Hi I have a number of indexed (No Duplicate) fields in my table as I want to enforce a 1-1 relationship in the data. They all lookup values in other tables. When I user tries to put a duplicate entry in the database I'd like a message to pop up saying 'This entry is already associated...
  3. K

    Display different subform depending upon which control is clicked

    I am creating a database to manage multiple mobile devices. The table structure is complete and I'm trying to build a set of forms. Simplifying things, I have tblUser, tblSim and tblDevice. I also have a tblJoin where you can select a UserID, SimID and DeviceID to create an item of...
  4. K

    query filter based on dates - excludes null values

    Hi I have been researching how to return all values in a query when a form critieria is left blank. I have made some progress, the combo box criteria queries were fairly simple, but i'm getting stuck with my date criteria. My query doesn't return null values when I want it to. I want it to...
  5. K

    time exports to Excel as 00/01/1900

    Hi I am trying to export a table from access to excel. It has a couple of columns with times in and when excel opens it just shows 00/01/1900 for all the values. Here is my query that creates the table for exporting: SELECT tblRoadClosuresAdditionalDates.Reference...
  6. K

    #### appear for some users and not others

    Hi I have a report with a series of date fields. For me the dates show up fine, but for some other users they get ##### show up (i assume this means the field is too small to hold the data). why does this happen, is there anyway to force the data to display even if the field is too small...
  7. K

    checking for duplicates

    Hi I have a form where customers are entered. I want to ensure the same customer is not given 2 references so am divising a bit of code to check. I have created a field on the form that strings together the Surname and UPRN. I have then created a qry which does the same and gives a count of...
  8. K

    runtime 438 error

    Hi I have a data export from Access into Excel, 3 spreadsheets are exported, a master sheet (StatCompile) opens that takes data from the exported sheets, and a 'control' spreadsheet (ctlxlsStat) opens and has some code to print x number of copies of the master spreadsheet. I have just...
  9. K

    changing the path of the default folder

    Hi All I have a script that I use to run a mail merge from Access to Word. This is executed from a form with a persons name. this is the code i use: Private Sub Command41_Click() On Error GoTo ErrorHandling DoCmd.SetWarnings False DoCmd.Close acForm, "frmWriteToClient"...
  10. K

    mail mergve vba runtime 4198 error

    Hi I have vba to perform a mailmerge: Private Sub Command41_Click() DoCmd.SetWarnings False DoCmd.Close acForm, "frmWriteToClient", acSaveYes Dim mypath As String Dim mypath3 As String Dim Wordpath As String Dim sDBPath As String Dim oApp As Word.Application Dim ThisDB As String Dim oWord...
  11. K

    Couple of small count problems in Report

    Hi I have a couple of minor problems in a report. I have 2 fields for carers (PrimaryCarer and SecondCarer) I want an unbound field to say how many carers there are per patient (there is only ever one or two) I have used this expression =IIf(Len([SecondCarerName]=0),1,2) I have also...
  12. K

    runtime 3075 when user doesnt select a ref

    I have a search form and the user has to select a case ref before clicking an action. if they don't select a case it throws up an error so i'm trying to put in some error handling. this is what i have, but it deosnt seem to be doing the job, please can someone let me know where im going...
  13. K

    problem with requeries in form

    Hi I have a form that I need to update whenever a value is changed but i seem to be getting some errors. the 2 problems are the dsum at the bottom do not seem to work consistently. Also if the user clicks the pcm box after putting an amount in but prior to selecteing a frequency, an error...
  14. K

    open args read only field

    Hi I have an 'add new' button on a form that opens a defferent form and passes through the ID value using the openargs, here is the code: Dim stDocName As String Dim strOpenArgs As String stDocName = "frmRIAProcessAdd" strOpenArgs = Me.ID DoCmd.OpenForm stDocName, , , ...
  15. K

    double click on listbox problem

    This is something i have done many times before, but today for some reason it wont work. I have a search form with a list box which shows the results. i have this code on the double click event: Dim stDocName As String Dim stLinkCriteria As String stDocName =...
  16. K

    referencing subform from a subform not working - please help

    Hi , i know this will be really easy for someone here, but im struggling to get this working. I have parent form (frmRIASelectApplication) and sub form (sfrmRIASelectApplication) . The subform is a datasheet. I am creating a dblclick event on the Control StandardLetterID of the subform. I...
  17. K

    mail merge access 2010

    Hi I'm upgrading one of my databases to 2010 (front end only). In the 2003 version the code for running a mail merge works fine, but im getting a runtime 91 error - object variable or with block variable not set. here is the code i'm using: Dim mypath As String Dim mypath3 As String...
  18. K

    setting up DB + Archive DB

    Hi I have a database that i need to archive and start a fresh as i'm integrating with some other software. My plan is this: 1. copy database AdviceDB back end and rename ArchiveDB 2. delete data in AdviceDB back end 3. copy front end and link tables of the new copy to ArchiveDB so i will...
  19. K

    Between midday a and midday b

    hi hope you can help me, I have a table with date/time field in. I have a date entry form with a 'from date' and a 'to date'. I have a query that uses the form a criteria to selct the date range, however I need the query to return only those entries received between midday the first date...
  20. K

    allowdeletions not working - please help

    hi I have my database forms set to not allow deletions, because in my experience people tend to do this by accident. I have since found myself haveing to do more systems admin than I would like, and trying to set up a way to allow others to delete under certain cicumstances. I have set...
Back
Top Bottom