Search results

  1. CJBIRKIN

    Use of Nz over many fields

    Hi To be honest i thought that the nz function was used to replace a null value i.e nz([TotalSales],0) if totalsales is null then replace with 0. If you want to total all the fields then you could lose the nz()'s you've added. If you genuinely need the nz function as i have described i don't...
  2. CJBIRKIN

    Can i "Add New Record" in a sub form?

    DoCmd.GoToControl formname DoCmd.GoToRecord , , acNewRec Chris
  3. CJBIRKIN

    Can I send a variable to a text box on a sub form?

    Sorry! Did you read the edit. Lose the "s" on frmSUBFORM.FORM(s) As for adding a new record. DoCmd.GoToRecord , , acNewRec This adds a new record but you have to set the focus to the subform. You could try frmSubform.setfocus but i'm not sure if that works. Try a search on this site. Chris
  4. CJBIRKIN

    Can I send a variable to a text box on a sub form?

    Hi The simple answer is yes you can. I'd try; Forms!FRM_MAIN_FORM!frmSUBFORM.FORM.txtTEXTBOX = MYVARIABLE Chris EDIT: SHOULD READ Forms!FRM_MAIN_FORM!frmSUBFORM.FORM.txtTEXTBOX
  5. CJBIRKIN

    Spreadsheets

    Hi Yes there is a limit of ~64000 rows of data in an individual sheet. Ps there is an excel board for excel queries;) Chris
  6. CJBIRKIN

    Calculate $$$ YTD in new Query column?

    Hi Take a look at the attached database. I think this is what you are looking for. If you have an questions please ask. Chris
  7. CJBIRKIN

    Time calculation

    Fair point well made!! If anyone's still interested i've tested this formula and it seems to work. runtime: IIf([start time]=[end time] And [start time]=#22:00:00#,#23:59:59#,IIf([start time]>[end time],(#23:59:59#-[start time])+[end time],[end time]-[start time])) to take into account the...
  8. CJBIRKIN

    Time calculation

    Hi Neil :confused: I'm not sure how your answer resolves the problem you suggest. -by using endtime<starttime rather than starttime > endtime, - any more than mine does. The fact is that if both times are equal, then the answer is 0. Therefore the first part of my formula -and yours-...
  9. CJBIRKIN

    Time calculation

    no worries
  10. CJBIRKIN

    Time calculation

    Hi I assumed from your question that you had already had some sort of query as you said that the calculation gave you the wrong answer. what i would do is in a new column type (where you would normally put a field name); Runtime: iif([start time] > [end time], (#23:59:59# - [starttime])+[end...
  11. CJBIRKIN

    Time calculation

    Hi Are you doing this in a query? Chris
  12. CJBIRKIN

    Time calculation

    Hi The data you have shown suggestes that the machine runs only for only 1 of your days 3111. The answer i am giving you could be modified for runs greater than one of your days Here's an example: first time 22:00 date 01/01/2003 second time 18:00 02/01/2003 The logic you need is: if first...
  13. CJBIRKIN

    Weening a global junkie

    Hi Just happen to be passing through and saw this, For my 2 pence worth i used to have the same problem. My solution was pretty standard. My understanding of the problem is not that global variables are necessarily evil it's just that over use -like the goto statement- can cause programming to...
  14. CJBIRKIN

    Key Still In Table

    Hi Thanks for the advice Pat, I will create the compound key as you suggest. I have coded the removal of the foreign key data from the refering hospital table if the user decides to alter the data post entry and it works fine. I just hope i don't get to the end of this and realise i've made...
  15. CJBIRKIN

    Key Still In Table

    Hi Thanks Pat :) , I came to the same conclusion last night (3am!!:o ). However i am still unsure as to the data structure that i have designed and i am loathe to continue until i know that i've got it right. Do you have any advice?? Thanks again Chris
  16. CJBIRKIN

    Key Still In Table

    sorry pic here
  17. CJBIRKIN

    Key Still In Table

    Hi I guessed i was going to have problems with this from the start. Basically i am trying to develop a db to record data about patients transfered between hospitals. There is an existing paper form that i cannot alter from which the db gets the data. I analysed the form and it appeared that...
  18. CJBIRKIN

    Key Still In Table

    Hi I have a form/subform setup with cascading comboboxes on the subform. I have three comboboxes. The first lists a number of hospitals. The second displays a list of wards which are filtered using the hospital selected in the first combobox. The third is a list of consultants who also...
  19. CJBIRKIN

    Drawing A Picture

    looks like its to big i've tried twice, and i can't make it any smaller so here is the code. This is on the sub form Private Sub IMG_BODY_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim CtlImg As Image Dim StrPath As String Dim StrBodyCount As String IntBodyCount...
  20. CJBIRKIN

    Drawing A Picture

    Sorry could have sworn i did!!
Back
Top Bottom