User Profile

Collapse

Profile Sidebar

Collapse
JenniferM
JenniferM
Last Activity: Apr 5 '19, 07:28 PM
Joined: Oct 22 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Report shows one result multiple times, Query for report showing all results

    Hello everyone,
    I have a single table, Tbl_ConsultTrac ker, which I am using to make a query and report (Qry_SearchResul ts and Rpt_SearchResul ts, respectively). Though other tables in my database have relationships to others, this one does not. It essentially contains fields "Consult_ID" (Autonumber/PK), "Consult_Name" (Text), "Consult_MRN" (Number), "Consult_Indicat ion" (Text), "Consult_StartDa...
    See more | Go to post

  • I played around with the loop code a little bit, and it looks like this solved the problem:

    Code:
    If Len(Nz(Me.TxtMedications, "")) > 0 Then
      GoTo SplitValues
      Else
      Exit Sub
      End If
      
    SplitValues:
    Dim strArray() As String
    Dim PRNBuild As String
    Dim ScheduledBuild As String
    Dim var As Variant
    
     strArray() = Split(Me.TxtMedications, "</div>")
    ...
    See more | Go to post

    Leave a comment:


  • That's a clever way of doing it, and sounds like it'd be the most efficient way too. For clarification on your earlier post, I have a memo field formatted in rich text that needs to be split into two textboxes formatted with rich text (TxtScheduledMe ds and TxtPRNMeds). For testing and whatnot, I'm using a rich text textbox, that I'm calling TxtMedications, which holds the string needing to be split.

    I've implemented your technique...
    See more | Go to post

    Leave a comment:


  • Need to search each line in RTF field / return lines that contain specific string

    Hello, esteemed experts!

    I have a RTF field called "TxtMedications " that contains multiple lines of text, each of these obviously preceded by a <div> tag. For example:

    Lacosamide 200 mg bid
    Divalproex ER 1500 mg qhs
    Pregabalin 50 mg q8h
    Ibuprofen 400 mg tid PRN
    Cetirizine 10 mg daily PRN

    Or in string form...

    <div>Lacosami de 200 mg bid</div>...
    See more | Go to post

  • And as per usual, NeoPa, you da man!
    See more | Go to post

    Leave a comment:


  • JenniferM
    replied to How to open forms....
    Someone who probably knows a little more than me might also be able to give you some advice, but this is what I would do in you situation. For both questions, I'd use the DCount function to determine if there are records that contain the value you entered.

    For your first question (assuming you're typing the ID number in a textbox control called TxtBox), I'd use something like:

    Code:
    If DCount("*", "tblPurOrder",
    ...
    See more | Go to post

    Leave a comment:


  • The main reason I was looking at creating a string here is that I want to be able to create a list of email recipients to send via Outlook. I've already got code that successfully exports the report to PDF form, I just want to be able to send that report to the intended recipients in an automated fashion.

    Right now, I have this to send the email:

    Code:
    Set miMail = appOL.CreateItem(olMailItem)
    With miMail
    .To = strEmailList
    ...
    See more | Go to post

    Leave a comment:


  • JenniferM
    started a topic Creating a string by looping through records

    Creating a string by looping through records

    I sort of know what I need to do, I just can't seem to find any references online that are giving me exactly what I need... Or maybe I'm just not understanding it (which is probably likely).

    So here's what I've got:
    I have 3 separate tables (TblContactInfo and TblMailingList which hold contact information, and TblEntries with primary key ID that holds the data for each report I want to create and send). TblContactInfo holds...
    See more | Go to post

  • JenniferM
    started a topic Randomizing records retrieved from a query

    Randomizing records retrieved from a query

    Here's the basic idea of what I'm doing. I'm creating a database with a list of practice questions for a class. I've got a table with a list of questions. Each has a field QstID (primary key, numeric), QstQuestion (string, question being asked), and QstTag (string, the text tag provided by the user)... There are other fields as well, but they are irrelevant to what I want to do.

    Let's say a user wants to do a quiz of all the questions...
    See more | Go to post

  • SQL to show records from 2 tables in single listbox

    Hey guys,
    I'm sure there's something really simple I'm overlooking here, so I'm hoping someone more learned will be able to point me in the right direction.

    Here's what I've got:
    When a patient fills out an initial visit form (which corresponds with TblInitialForm, primary key is ID), their surgial and non-surgical plans are recorded in two separate tables, TblSurgPlan and TblNonSurgPlan. The primary key for both tables...
    See more | Go to post

  • You could try using a MsgBox here:

    For instance, you could try:

    Code:
    Private Sub YourButtonName_Click()
    
    If MsgBox("Are you sure you want to close this form?", vbYesNo + vbQuestion) = vbYes Then
    
    DoCmd.Close
    
    Else
    Exit Sub
    End If
    
    End Sub
    The code opens up a message box with the question, "Are you sure you want to close this...
    See more | Go to post

    Leave a comment:


  • Yes, all new patients are stored in TblPatientDemog raphics, with their primary key PtID.
    I gather you're asking about how I handle numbering new ones--- in this case, I'm going off their chart number, which is just a random number anywhere from 5-7 digits long. I wish there was some rhyme or reason to how we get these, but there just isn't.... Ergo, I have to manually input their PtID.
    See more | Go to post

    Leave a comment:


  • Thanks for the replies. After ADezii's first post, I created a numeric field within the table called SxSurgeryNumber. I ended up using SQL to get the max from this field using this code:


    Code:
    Dim rst As DAO.Recordset
    
    Set rst = CurrentDb.OpenRecordset("SELECT _
           MAX(SxSurgeryNumber) FROM [TblSurgeryForm] _
           WHERE [PtID] = " & _
           [Forms]![FrmPatientDemographics]![PtID]
    ...
    See more | Go to post

    Leave a comment:


  • PtID is a numeric value that will vary between 5-7 digits in length (I wish they were all one length, but these are the chart numbers that I have no control over--- dang it!).

    Anyways, my initial approach to this problem was to perform a count of all records where PtID and SxAffectedSide (Right/Left) matched--- then add 1.

    Here's my code (I realize there's probably a cleaner way of doing this, but you get the general...
    See more | Go to post

    Leave a comment:


  • Code:
     & "WHERE ([PtID] = " & [Forms]![FrmPatientDemographics].[PtID] & ")"
    I had to change the last line to this, but that's only because the string it made was missing a ")"..... Thanks a lot for your help!!
    See more | Go to post

    Leave a comment:


  • Too few parameters when using strSQL to update field

    I'm having a problem with an SQL string that updates a field (RefPhysicianID) in the table TblPatientDemog raphics. The user navigates through a search, the results are displayed in a list box (in which the bound column is RefPhysicianID in TblRefPhysician), and the following code is used to update the field that links the records between two tables.


    Code:
    Private Sub BtnSelectPhysician_Click()
    
    If MsgBox("Assign
    ...
    See more | Go to post

  • Thanks!! This works great!
    See more | Go to post

    Leave a comment:


  • How to set new embedded image for bound togglebutton = true

    I've got a series of toggle buttons that are bound to yes/no fields in a table. Right now, the picture for all of them in the properties section is set to BtnGray.bmp (which is embedded). I have another .bmp file (BtnBlue.bmp) that I want to display if the toggle button's state is true.

    My previous attempt to work around this problem (although I'm pretty sure this is NOT the way it should be done) involved creating an unbound toggle...
    See more | Go to post

  • How to generate a text string for use as primary key?

    Using Access 2007

    My table (TblPtDemographi cs) contains a primary key of PtID, which is a numeric field.

    Linked to this table is TblKneeSurgeryI nfo, which contains a primary of SxKneeID, which is a text field. It also has a field SxKneeSide, which designates "Right" or "Left."

    The format of SxKneeID should be as follows:

    R111111S1

    1. Where "R" indicates...
    See more | Go to post

  • I guess my original aim was to just create a query, so I didn't realize it was necessary--- my apologies there, ADezzii, and I appreciate your patience with this. Your solution worked... thank you!!! I wasn't aware that you could use listboxes in that way. I guess you learn something new everyday!
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...