Search results

  1. K

    refer to variable via string

    Bingo... That works.. Thank you for helping with this. That will come in very useful..
  2. K

    refer to variable via string

    ha... all these post coming so quick is confusing. Gemma.... or even Dave. lol
  3. K

    refer to variable via string

    my last post explains what vField.name is... it just refers to the table field. the variable is set in the same procedure so definately in scope.
  4. K

    refer to variable via string

    hi Gemma sorry, didn't see your reply at first. vField.name is the field name. e.g below I am populating the table with information from text files. For Each vField in rs.Fields rs.Fields(vField.name) = Eval("a" & Replace(vField.name, " ","")) Next vField Like I said, I thought this...
  5. K

    refer to variable via string

    sonof27 That doesn't work. That would be fine if I wanted to add the 'string' to the table. e.g put 'aColleagueNo' in the table. I want to put the value of the variable in the table e.g aColleagueNo = 12345 vbaInet I have looked at the help files for both but can't get it to work...
  6. K

    refer to variable via string

    thanks for the reply. I have had a look at both but I dont understand either. Would you be able to provide an example please....?
  7. K

    refer to variable via string

    Hi all Is it possible to refer to a variable from a string. I can refer to a field by a string but can't get a string to be used aa a variable. Heres what I have rs.Fields(vField.name) = "a" & Replace(vField.name, " ","") I know the first part works (before =) as I have tried just putting...
  8. K

    Open a report and set Orderby

    Hi How do I open a report and set the Orderby property. DoCmd.OpenReport "rptColleagueByTeam", acViewPreview, "qryColleagues", "[Shift]='" & strshift & "'" Here is the code that opens my report, now I want to sort by 'TLsurname' I thought I would just be able to add the order by on at the...
  9. K

    Total of fields in reports

    Hi Thanks for the response. That is counting all the times male or female appears in the report, it is not summing the amounts. I think I have done it now after modifying your formula. =Sum(IIf([Gender]="Female",[CountOfEthnicity],0)) This seems to work. Thanks for your help on this. Kev
  10. K

    Total of fields in reports

    Hi all I have a report that is grouped by ethnicity and in each ethnic group is then grouped by gender. My report currently shows the split of male/female in each ethnic group and shows a total in each group. At the bottom of my report it gives me a grand total of all, but what I want is to...
  11. K

    Display field relating to control source property

    Hi all is there a way to display a relating field to a control source property in a report. e.g Controlsource = TeamLeader Teamleader is a lookup in my table from TLno/ TLname. bound column to 1, column count to 2, width to 0;2.5cm (so only the name is displayed in the table but the...
  12. K

    #ERROR in textbox

    Thanks I see, useful to know. Thanks for you help. appreciate it. Kev
  13. K

    #ERROR in textbox

    :confused: Hi Bob OK, now that works fine.:D:D What is IIF then, never seen it used before?!?!? Cheers KEv
  14. K

    #ERROR in textbox

    Hi bob Thanks for your replies, but I still can get this to work. Here's what I have now. Textbox named txtDOB with its control source as DOB field Formula in control source of age textbox (txtAge) =IF(IsNull([DOB]),"",Age([DOB])) Function Public Function Age(dtDOB As Date) As Integer...
  15. K

    #ERROR in textbox

    Hi Bob I am still getting #Name? appear in the textbox. the function I am using is: Public Function Age(DOB As Date) As Integer Age = DateDiff("yyyy", DOB, Date) + (Date < DateSerial(Year(Date), Month(DOB), Day(DOB))) End Function I entered =IF(IsNull([DOB]),"",Age([DOB])) in the...
  16. K

    #ERROR in textbox

    Hi Bob I am still getting #Name? appear in the textbox. the function I am using is: Public Function Age(DOB As Date) As Integer Age = DateDiff("yyyy", DOB, Date) + (Date < DateSerial(Year(Date), Month(DOB), Day(DOB))) End Function
  17. K

    automate undo unless saved

    Hi I have a form that is has record source set to a table. if the user does not click the save button I want any changes that have been made to the record to be undone. i.e if the user makes a change but then clicks next/prev record. I only want the record to save when the user clicks on a...
  18. K

    #ERROR in textbox

    Hi all How do I stop #ERROR from appearing in a text box when there is no data in a required field. my function is =Age([DOB]). This works fine as long as there is a date in the DOB field. I need something along the lines of =IF(IsError(Age([DOB])),"""",Age([DOB])). Or is this the wrong...
  19. K

    insufficient permissions

    Hi all I am having the same problem with the permissions. I have search but can't find anything that actually gets rid of the permissions. I have the AOPR (Advanced Office Password Recovery), which by the way is very very good. but that only gets rid of passwords. it has also give me a user...
  20. K

    Show/Hide Access

    Hi DJKarl Thanks for you reply. At least I know that its not just me that has the problem. I have took it off for now, it wasn't really important. I will look into the moveapi. Cheers Kev.
Back
Top Bottom