Recent content by Hargo

  1. H

    Is it good practice to have 2 data entry forms for the same table?

    Thanks pbaldy but I wouldn't know how to do that, I got help on the original OpenArgs!! What do you mean by 'maintain' 2 identical forms? What maintenance are we talking about? Told you I was a newbie haha
  2. H

    Is it good practice to have 2 data entry forms for the same table?

    Hi, I'm a bit of a newbie using Access 2013 I have a data entry form for New Patient Admissions which opens up from a New Patient data entry form and inserts the NHS Number (using OpenArgs) then sets the focus to the next control and positions the cursor with SelStart My Problem is that...
  3. H

    Why would 'Got Focus' SelStart work in one form and not another?

    Hi bit of a newbie using Access 2013 I have several tables with Patient ID as Foreign Key related to a Patient table with Patient ID as Primary Key - the data type is set to text as the ID must have "SG" followed by a unique number 000148 for example For the Patient ID controls in my data...
  4. H

    Trying to populate form control with OpenArgs

    Thanks pr2-eugin I've solved it....I had a form close command before my line of code!!!!! Doh :banghead:
  5. H

    Trying to populate form control with OpenArgs

    The error is in the DoCmd line - I'm assuming there's a syntax error in the openargs part at the end The rest I lifted from the source in my hyperlink so I haven't a clue, sorry It claimed to be code for passing a value (in this case NHS Number)
  6. H

    Trying to populate form control with OpenArgs

    Hi everyone, Newbie alert!!! Can anyone suggest what is wrong with my code please? I have this code in a button on my Patient Form: DoCmd.OpenForm "frm_Admissions", acNormal, , , acFormAdd, , "NHS Number|" & Me.[NHS Number] And this in my Admissions form LoadEvent: Private Sub Form_Load()...
  7. H

    Crosstab Query ??

    Hi I am trying to create a form in Access that does the same as the spreadsheet shown in the attached doc My initial problem is that I don't know how to get all the Item Numbers into a cross tab query - each item is a field in a table From what I can see cross tab queries have a maximum of...
  8. H

    Opening a Form in Datasheet view PROBLEM

    Thanks for suggestion pr2-eugin but it still brings back the same message EDIT - - - - I just removed AcFormView = and now it works
  9. H

    Opening a Form in Datasheet view PROBLEM

    Hi I'm trying to open a form in datasheet view using the following code Private Sub Run_Activity_Duration_Totals_Click() DoCmd.OpenForm ("frm_Activity_Duration_Totals_25_Hours"), AcFormView = acFormDS End Sub I keep getting a message saying Compile Error: Type Mismatch and the equals...
  10. H

    End Time - Start Time Query result problem

    Hi I have a query with a calculated field (Duration: [End Time] - [Start Time]) When I run the query the result appears to show the duration as a percentage of a day i.e. End Time 13:00 - Start Time 12:00 = 1 Hour Duration Shows 4.166666666666666E-02 If I format the field 00:00 I get...
  11. H

    Populating Form 2 Foreign Key Control with Primary Key from form 1

    Hi jdraw Admissions is NOT a subform of Patient because it has tab control with three pages and has its own subform on page 1 I am unable to insert links etc due to low post count but in any case cannot zip (file size is 179kb - is this too big?) Patient table has a 1 - Many relationship...
  12. H

    Populating Form 2 Foreign Key Control with Primary Key from form 1

    Hi folks I am trying to get the Primary Key value from one form to auto-populate the foreign key value of a second form I have tried the following code in both the second form's Load Event and the Foreign Key Control Got Focus Event but nothing doing... Me.[NHS Number] =...
  13. H

    Set Focus on tab control

    I suspect my first post was too vague so hopefully this helps.... I have tried using this as a response to the tab key being pressed whilst in the last field on page 1 of my tab control: Private Sub Combo8_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 9 Then Me.[Tabbed Admission...
  14. H

    Set Focus on tab control

    Hi On my data entry form I have a tab control with three pages At the bottom of the first page I have a sub form with 3 fields Currently, when tabbing, the focus runs through the fields as per the tab order BUT Once it gets to the subform (datasheet view) it jumps into the first field of...
  15. H

    Hope this is 'General'

    I've solved it thanks
Back
Top Bottom