Search results

  1. S

    Dynamic report generating

    I have a database to record patients treatment regimens. So, each patient has a Medical record number[MEDRECNO] in tblOncReg, which can have multiple treatment regimens[RegID] in tblRegimen. Each treatment regimen can have multiple cycles[CycleID] in tblCycle. Each cycle has multiple...
  2. S

    Trimming first and last name fields

    I figured it out guys. Richs' original didn't work, but I modified it and it works. The control source is now set to: =[Forms]![OncRegMain]![LNAME] & ", " & [Forms]![OncRegMain]![FNAME] Thanks for the help. Now I've got another thread in the "Reports" forum that maybe you guys could help...
  3. S

    Displaying combo box selection in a report

    When creating a report, what does the control source need to be set to for a field that is supposed to be populated by a combo box selection. In my instance, I have a form where a Primary Physician is selected from a combo box. This combo box looks to table tblPhysicians for its values. When...
  4. S

    Trimming first and last name fields

    Kernel Is that line the only thing that needs to be entered in the querys field row? I put that in, then set the control source of the text box in the report to the query which sets it to "=[FullName]![FULLNAME]" That doesn't seem to be working.
  5. S

    Trimming first and last name fields

    I'm creating a report in my DB and for the name, I'd like to have the format be "LNAME, FNAME". The problem is that in the table, I have LNAME and FNAME as 2 seperate fields. How can I create a report that will give the last name, comma/space, and first name so that it trims the text box down...
  6. S

    Autopopulating subform with correct data

    I've got a form(OncRegMain) that has a subform(WeightDate). The subform accepts a [WEIGHT] and [CURRENTDATE] fields into a table tblWeightDate that has an autonumber primary key [WtEntryID]. When I open the form OncRegMain to view patient info, the subform populates with the first...
  7. S

    Code not working

    OncRegMain is opened from more than just the search form, but wouldn't that work either way? **Just tried it and it works. What I'd like to try is to put that same search combo box on the top of the OncRegMain form so that users can jump from patient to patient without going back to the...
  8. S

    Code not working

    Now, do you guys have any ideas on how to get that search form to close when I hit enter? I tried macros to close the form on relevant events, but none seem to be working.
  9. S

    Code not working

    OK Kernel, I got it working, but here's some strange things that might explain why it wasn't working before. I followed your debugging steps(thanks for those by the way....probably would've been tough to figure out had I not done that). I selected a record from the combo box, hit enter, and...
  10. S

    Code not working

    The only thing that's even coming close is using the following code in the "On Key Down" event, but there's still no data being populated. Private Sub Combo16_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then '13 is the enter key so the event only occurs when the enter key is...
  11. S

    Code not working

    Thanks for being so quick with the responses guys. This is farther than anyone's been able to get me so far, but it's not quite all the way there yet. I took the DoCmd.close out for now because it kept giving me errors no matter which of your ways I tried. ***Correction*** Using the code...
  12. S

    Code not working

    Kernel Here are some updates: 1. When I use DoCmd.Close, I think it's applying that command to the form that was opened in the previous line because it opens form OncRegMain and closes it righ away. I took DoCmd.Close out just to see if the form was populating, and it wasn't....but it did...
  13. S

    Code not working

    Thanks for the replies. Kernel I tried what you suggested. When I select something from the combo box, and hit enter, the form OncRegMain opens, but no fields populate. I also get a VB runtime error '2465': Application-defined or object-defined error. When I debug, the line with...
  14. S

    Code not working

    Hello all I don't know VBA at all, but I got a piece of code to use for an issue I was having, and I'm not sure if the syntax is correct. Here's the code: Private Sub Combobox1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then '13 is the enter key so the event only occurs...
  15. S

    Combo box to populate form

    Here's another idea someone gave me, but I don't know if the syntax is correct because I keep getting errors. The following code should run on the "On Key Down" event to open the form with all fields populated: If KeyCode = 13 Then '13 is the enter key so the event only occurs when the enter...
  16. S

    Combo box to populate form

    I'm not sure if I'm following how to do this. Please let me know if I'm wrong: 1. In expression builder, I need to set the record source of form OncRegMain to table tblOncReg where 'MEDRECNO = comboboxMEDRECNO' When I try to set the record source of the form OncRegMain, I get a message...
  17. S

    Combo box to populate form

    Hello all As a new Access user, I'm building a database and have learned a lot up to this point. But....now I'm stuck. I have a main form(OncRegMain) that adds records to a table(tblOncReg). This table has a primary key(MEDRECNO). What I want to do is create a search form with a combo box...
Back
Top Bottom