Search results

  1. K

    Creating a salutation field from a name field in Access 2007 - replacing characters

    Hi PBaldy Thanks for your quick reply. I'd never come across InstrRev before. I read that the syntax is different for InStrRev but I cannot work out why I cannot get any results from InstrRev([Name]," ") with criteria >"0" On my test database every name should have a value for this...
  2. K

    Creating a salutation field from a name field in Access 2007 - replacing characters

    Hello - I hope someone can help. We have an Access 2007 database with many thousands of names and addresses, for a mailshot. The name field is a single field with the title, initials and surname in the one field. We need to create salutation fields using the title and surname only. The...
  3. K

    DCount dilemma

    The form is unbound. The form updates a table which is then used by other staff members for issuing packs and which should not have any stars in the fields. I am not allowed to amend the original table, so have to use DLookup to populate the form, then the instring query to remove the stars...
  4. K

    DCount dilemma

    Hi Paul I agree with you, I don't need DCount - I do need to count the number of stars in a field not the number of records with stars... I have successfully adapted your suggested code as follows: If InStr(Nz(DLookup("[Name]", "dbo_measurement", "meas_id = " &...
  5. K

    DCount dilemma

    Hi The Mailman I can't use if not isnull because the Name, Salutation or Address fields will have text and numbers in them, it is just the stars that I want to remove. Equally because we've more than 6 million distinct records, I can't pre-empt what the name, salutation or address is going...
  6. K

    DCount dilemma

    Hi Paul Thanks for your reply, but I'm still getting an error. This time it is : "Compile error: Wrong number of arguments or invalid property assignment" It must be the fact that I've got the source database and the source column listed - I'm trying to reuse a previous DCount...
  7. K

    DCount dilemma

    Hi Everyone Apologies for what might well be yet another novice question ! I have a form with a subform from which the user selects a record, which then populates the form. The problem is that some (but not all) of the historical name, salutation and address fields in the original source...
  8. K

    Dlookup - changing a value in a form

    Thanks for your reply. We decided to go for an unbound form so that if the user made a mistake, it wouldn't corrupt the underlying database, just the end table used to issue new tests. I'm already using a subform so the user can input a postcode on the main form and then select the correct...
  9. K

    Dlookup - changing a value in a form

    Hi Paul The DLookup table contains the details we have about a property which has already been tested. The new form is to generate a new test at the same property, hence needs to have a few of the fields populated by known details about that property. (The new form also has text boxes and...
  10. K

    Dlookup - changing a value in a form

    Hi - I wonder if anyone can help? I'm making a form for colleagues to use which will eventually populate a table. I'm using DLookup to populate some of the fields in the form from another table. The problem is that for a few of the fields in that other table, the values are incorrect...
  11. K

    error in code to automatically clear fields between entries

    Hi Mihail Thanks for your advice - removing the "exit sub" works. I can't use a combo box for the postcode as the client could enter any of several milllion UK postcodes on the real version of my form.... We have some 8 million existing records and need to link a new request for our...
  12. K

    error in code to automatically clear fields between entries

    I hope I've successfully uploaded a zipped stripped-out version of of my database and form. The problem is as follows: If, for example you type in postcode ABCDEFG1 and click on the "click here to select from current records" button, it will display records of previous tests. You select a...
  13. K

    error in code to automatically clear fields between entries

    Hi JHB I've checked, all the text boxes I want to clear have a tag "clear". I adapted the code from code I found online: Dim ctlCurr As ControlDim booCondition As Boolean For Each ctlCurr In Me.Controls If ctlCurr.Tag = "Group1" Then ctlCurr.Visible = booCondition End If Next ctlCurr...
  14. K

    error in code to automatically clear fields between entries

    Hi JHB Thanks for your reply. It was the CtlCurr in the "For Each CtlCurr In Me.Controls" line which was highlighted. I've tried your suggestion (putting the "Dim CtlCurr as Control" line above the "For Each" line) and that stops the compile error, but it no longer clears the filled fields...
  15. K

    error in code to automatically clear fields between entries

    Hi All I'm still learning so please accept my apologies for what is probably a beginner's mistake. I have made a form with a subform to search for existing records based on inputting a postcode then selecting the relevant address from the subform which then fills the form with details of...
  16. K

    Using VBA to automate Access 2007 queries with a form for users

    Hi Spikepl I can't do a screenshot, unfortunately. The process I use currently is as follows: Run a make table query on the initial results database and prefix the new table name with the date in the format yyyy-mm-dd. Use that new table and run 7 x update queries on it to convert code...
  17. K

    Using VBA to automate Access 2007 queries with a form for users

    Hi All Apologies - I am new to VBA so am probably trying to run before I can crawl..... I've been using Access 2007 to run queries on a database where we eventually export results as separate Excel spreadsheets for individual clients. The process is quite involved, using queries to change...
  18. K

    Problem with subforms - visible / invisible

    Thanks for all of your suggestions. I ended up deleting that form and starting again with a single subform and narrower columns to reduce scrolling.....! Perhaps when I've developed some knowledge in a few months I'll try again with the two subforms... Kate
  19. K

    Problem with subforms - visible / invisible

    CJ_London - the control source is Type - which is on the underlying table. I just called the text box txtType, as that seems to be the correct protocol. Is that incorrect? Mihail - thanks, but when I tried your suggestion, having commented out the others, I still get the same compile...
  20. K

    Problem with subforms - visible / invisible

    Hi Lenford I've tried your suggestion but the Else statement is in red. If I change it to have an Exit sub after the "D" section then I'm still getting the same compile error and the .dbo_OSAddress_subformD or .dbo_OSAddress_subformO is highlighted in blue.... Regards Kate
Top Bottom