Search results

  1. SteveA

    Trim Expression

    Section is a reserved word for Access Reports. The Report Header, Page Header, Detail etc are all considered sections within an Access report. Using a different name for your field should resolve this issue. SteveA
  2. SteveA

    Looping

    Try the following: Function ChkFirstWhile() Dim CurrentTime, StartTime StartTime = "11:45:21" CurrentTime = Time Do Until CurrentTime = StartTime CurrentTime = Time Loop MsgBox "The time is " & Time End Function HTH SteveA
  3. SteveA

    OLE Error ?

    The only option I could think of is that one of the cells in the spreadsheet has been set to locked. This also happened to me, when someone decided to redesign a spreadsheet without letting me know . HTH SteveA
  4. SteveA

    Disable subform if your not admin user

    In VBA you can make a field visible or hidden by setting its Visible property to True or False. For a subform, you might have Me.SubformName.Visible = Administrator() Administrator() could be a program or a field that identifies if the current operator is an administrator. HTH, SteveA
  5. SteveA

    Lightweight

    Lightweight refers to whether a Form or Report has its own class module. Have a look at HasModule in Microsoft Access help. It discusses it a bit further. HTH SteveA [This message has been edited by SteveA (edited 10-24-2001).] [This message has been edited by SteveA (edited 10-24-2001).]
  6. SteveA

    Disable subform if your not admin user

    Is your database secured or do you have another way of identifying an Administrator? Cheers, SteveA
  7. SteveA

    OLE Error ?

    I had this problem with an export and found that I had a corrupt entry in my table in Access. Once I deleted the corrupt entry, the export worked fine. I still haven't identified what corrupted that particular record. HTH SteveA
  8. SteveA

    What date is Next Thursday

    Hopefully this should do it: =IIf(WeekDay(Date())>=5, DateAdd("d",12-Weekday(Date()),Date()), DateAdd("d",5-Weekday(Date()),Date())) HTH SteveA
  9. SteveA

    spacing

    Access will not shrink fields horizontally, only vertically, and will only shrink fields vertically if there is no text at all to display on the nominated row (including labels). If you want to have a field that shows First and Last Name together, you could try having one field with a...
  10. SteveA

    Required data

    If you want to place the cursor at a specific field on a form, try Me.[MyField].SetFocus HTH Steve
  11. SteveA

    Data Validation on forms BeforeUpdate event

    The code appears to say that everything is OK if the customer type is B and a name is entered, however this means every other combination is invalid. Try the following code: If Me.Type.Value = "B" And IsNull(DisplayName) Then MsgBox "The customer name is a required field for business...
  12. SteveA

    Auto fill Field

    Its up to you what to do with the return value. All the Msgbox does is return which button the operator pushed. You can decide to do anything you want after the operator has made their selection. ie Dim intReturn as Integer intReturn = Msgbox("Hello World",vbRetryCancel) If intReturn = vbRetry...
  13. SteveA

    Some Simple Form Obstacles..I hope

    Okay. Here goes 1. I would click the ... and then choose Code. Drop the code into that section. The NZ() command checks to see if the field is null, if it is it will pass "" to StrConv instead of a Null value which can cause some functions to fall over. 2. Placing > in the 'Properties>Format'...
  14. SteveA

    Some Simple Form Obstacles..I hope

    StrConv is a function that you would run as part of the AfterUpdate event of your field or in the BeforeUpdate event of your form. ie[Forms]![MyForm].[MyField] = StrConv(nz([Forms]![MyForm].[MyField]),vbProperCase) I don't think there is a command such as '>' that you can place in the Format...
  15. SteveA

    Some Simple Form Obstacles..I hope

    Sorry Pat, I saw UCase mentioned and talk of the first letter being capitalised. I should have read through the full question properly before posting a reply. SteveA
  16. SteveA

    Some Simple Form Obstacles..I hope

    Try StrConv([Enter Your String],vbProperCase). This function will convert the first letter of each word to a capital. HTH SteveA
  17. SteveA

    Auto fill Field

    If you are calling MSGBOX in code, you can do the following: Msgbox "My Error Message", vbRetryCancel This does actually return a value, so you can do checks on it. ie If Msgbox("My Error Message", vbRetryCancel) = vbRetry then ... HTH SteveA
  18. SteveA

    Subform form not visible when record is null

    The line 'Forms!frmPtasNew!ProcedureID = Me.ProcedureID' is using the subform field ProcedureID to set the Procedure ID on the new form. When you don't have a record displayed in the subform this information is not known. You need to change Me.ProcedureID to point to the field in the main form...
  19. SteveA

    Creating a Module to Calculate billing Days

    Just a couple of questions: Do you have a start and end date for the billing period? and, Do you have a list of each day a newspaper was delivered for a particular customer or is it assumed that the paper is delivered every weekday and Saturday during the billing period? Cheers, SteveA
  20. SteveA

    I don't care about the Year

    The hardest part is the fact that you are storing a date and dates are dependant on day, month and year. Perhaps you could look at having a process that bumps the date by a year once it has elapsed. You could write an update query that says if the Date is in the past, add one year to it. If...
Back
Top Bottom