Search results

  1. L

    Propagate entries into table based on subform field number

    Here is the code which was being used when it was a listbox and did not need to do multiple copies: Private Sub btnMailMerge_Click() Dim varItem As Variant Dim strSQL As String DoCmd.SetWarnings False DoCmd.RunSQL "DELETE * FROM tblMailMerge;" DoCmd.SetWarnings True For Each varItem In...
  2. L

    Propagate entries into table based on subform field number

    I have a main form (frmMain) which has 2 unbound controls ("Name" and "DOB") then a subform (sfrmMedications) in datasheet view with 4 fields "Selected" (Yes/No), "Medication" (text), "Strength" (text) and "Copies" (number, limited to 1-9). The sfrmMedication sub form is linked to a temporary...
  3. L

    Propagate entries into table based on subform field number

    I'm just not sure how to incorporate that loop into stepping through the records which are "selected" and using the copies value from the current record only (me.copies referring to the current record)
  4. L

    Propagate entries into table based on subform field number

    I am attempting to create a mail merge database which can create printable labels and need to increase the number of generated labels of certain types based on user input. I have a main form which has some fields which appear on every label (name and DOB) then I have created a subform which...
  5. L

    Drag & Drop Outlook .msg to Form

    Definitely have access on that folder - in fact the routine actually made the folder the first time when I had a typo in the name (so has folder creation permission, not just file creation). It works with same log in with an Outlook 2010/Access 2016 combo but not Outlook 2016/Access 2016. The...
  6. L

    Drag & Drop Outlook .msg to Form

    Ok it looks to be a computer specific, maybe rights based issue. I have tried the DB on a machine with Outlook 2010 (after changing it to late binding) and it works as intended. I tried my personal machine with Outlook 2016 and Access 2016 and it also worked fine. The machine that it errors...
  7. L

    Drag & Drop Outlook .msg to Form

    I am trying to allow users to drag and drop an Outlook email on to a form and have it save the .msg to a destination folder and store the information in a table. I have read the tutorials and achieved this for regular files (drag and drop via explorer) using a ListView control but Outlook...
  8. L

    Best setup for cascading combo boxes

    Thank you all for the help - I was reluctant to set a property via code that I could not set via the GUI (in case it created an issue that the initial restriction aimed to avoid) I managed to achieve this with the NotInList event. Pat's solution may also work but as I tested the NotInList...
  9. L

    Best setup for cascading combo boxes

    I agree that I hate to allow users to manually add things but unfortunately I only have lists that I can limit response to in the 3 categories - I cannot create or keep up to date the lists for the others. Sorry I should have said that I tried setting the Limit to List to "No" but it was...
  10. L

    Best setup for cascading combo boxes

    I am seeking some advice on how best to set up some cascading combo boxes (or if this is exactly what I need to start with). (I have read the link to Cascading combo boxes examples but my needs go beyond those examples). The scenario - I have a form used for user entry which I want to guide...
  11. L

    Parsing pasted text into record(s) in table

    I just used var2(0) = Trim(var2(0)) and it worked. Is that really bad programming?? Edit: I added it directly to the DLookup instead: lngSiteID = Nz(DLookup("SiteID", "Table", "Field1=" & Chr(34) & Trim(var2(0)) & Chr(34)), 0) Everything seems to be working as expected now - thank you!
  12. L

    Parsing pasted text into record(s) in table

    If I a using the watches right var2(0) contains the " GCH" so the above would not fix that? Does that change the way that Trim works then if sometimes it gets a leading space " GCH" and sometimes it does not? "ATH"
  13. L

    Parsing pasted text into record(s) in table

    OK I found the issue - the first record when pasted does not have a leading space (see original post) but all the other ones do. It was trying to Dlookup " GCH" instead of "GCH" and was not getting a match. I need to trim the leading space.
  14. L

    Parsing pasted text into record(s) in table

    I've made this change but I can only get it to work for the first record (it correctly identifies "ATH" as site "6"), after that it returns a site of "0" for all subsequent records.
  15. L

    Parsing pasted text into record(s) in table

    Looks like I spoke too soon in a way - it worked in my test database very well but when I implemented it into the real database I hit a problem. The "siteID" in the SiteList table is set up as a lookup from a table which contains the codes so users can easily select them when entering data (it...
  16. L

    Parsing pasted text into record(s) in table

    Both provided examples worked as expected - thank you both. It did lead me down a rabbit hole regarding DBEngine(0)(0) vs CurrentDb but that is the joy (?!) of Access programming - there is more than one path to the destination.
  17. L

    Parsing pasted text into record(s) in table

    I'm going to try in the morning when I am back in front of the PC - thanks.
  18. L

    Parsing pasted text into record(s) in table

    Ok great. So if I am reading that right it steps through the string looking for the colons and parses either side. That is an excellent solution, I'll give it a go and feed back. Thanks. ** I've spotted the vbNewLine code as well which I think is the solution that I was missing.
  19. L

    Parsing pasted text into record(s) in table

    Thanks for that but I still come up against the original problem - how do I step to the next line to create the next record?
  20. L

    Parsing pasted text into record(s) in table

    Hi All I'm a google search hacker when it comes to Access programming and am seeking some guidance about how best to achieve a goal so I can research in the right direction. I have a database with a main table (DocumentList) and a primary key DocID. This is linked to a second table (SiteList)...
Back
Top Bottom