Search results

  1. Sammy B

    The Problem with Null

    If you still need the function to run then do this: myfunction(nz(Mytext),mynumber) However, if you do not want it to run if it is null then you need to do this: If isnull(Mytext) then exit sub (or other stuff) else myfunction(Mytext,mynumber) end if Sam
  2. Sammy B

    Referencing a Subform

    Ok, I can at least show you how you need to refer to a control from one subreport to another subreport. Let us say we have a report named "Main Report" Let us say we have 2 subreports called "subreport1" and "subreport2" And let us say we have a text control on subreport1 called "GetMe" And...
  3. Sammy B

    Problems with PERCENT data

    Did you not say that the price before the 10% discount was already screwed up? If so, was there a process before that manipulated this number or was it directly inserted in a field?
  4. Sammy B

    Referencing a Subform

    I am a little confused. Are you running this code from one of the sub reports or from a control on the main form? Sam
  5. Sammy B

    Enabling Fields in Forms

    Under the form property data tab set the Record Set type to 'Snapshot' Then create your button and name it Lock. Set the Caption to "Edit Records" Then under the event tab choose click and paste in this code: Private Sub Lock_Click() If Me![Lock].Caption = "Edit Records" Then...
  6. Sammy B

    find first record in a set of fields

    I know this may not help you but this is how I choose a 'last' number that was not '0' in one of my queries. SELECT Last([Table1].[Number]) AS My_Last FROM Table1 WHERE (([Table1].[number]>0)); I had a table (Table1) with single number entries and this query pulled that last number that was...
  7. Sammy B

    Problems with PERCENT data

    My guess is that some where you have done other calculations to come up with the 576,09 figure. Access, depending on your settings can calculate math to many decimal points but (again depending on your settings) only shows you the last 2 or 3 decimal points. Then, farther down the process you...
  8. Sammy B

    Make the form's object invisible

    Sorry, but in the process of removing unnecessary code from my example I inadvertently made a few mistakes. Here is the corrected code. Sam Private Sub Form_Current() Dim ctl As Control For Each ctl In Controls If ctl.Properties("Tag") = "R" Then...
  9. Sammy B

    Make the form's object invisible

    Suprizingly I had to do the exact same thing my self. Here is my solution. I placed the letter R in the 'Tag' property of each of the controls I need to make invisible. I then placed this code in the forms 'On Current' event property. Sam Private Sub Form_Current() Dim ctl As Control...
  10. Sammy B

    Make the form's object invisible

    Suprizingly I had to do the exact same thing my self. Here is my solution. I placed the letter R in the 'Tag' property of each of the controls I need to make invisible. I then placed this code in the forms 'On Current' event property. Sam Private Sub Form_Current() Dim ctl As Control...
  11. Sammy B

    Can't move the focus

    I am not sure what is wrong with your code but try this instead: Private Sub UnitDesc_Exit(Cancel As Integer) If IsNull(Me![UnitDesc]) Then MsgBox ("You must enter a Unit Description") Me![UnitDesc].SetFocus Exit Sub Else 'other stuff End If End Sub
  12. Sammy B

    Adding records to filtered form.

    Revised Database Simon, Here is the database. Let me know how it works for you. I would have no problem adding a few features if you don't mind working with me. (I do not profess to be an expert or anything, I just like programming in Access) Take care. Sam
  13. Sammy B

    Date to Price Relationship Help

    Consider setting up an extra table called Htl_Price (or whatever). Tie that into main form with PriceID. Your price table might be set up thusly: Hotel Table HotelID PriceID Hotel Name Hotel Other suff etc Price Table PriceID From_Date To_Date Price etc
  14. Sammy B

    Tab control problems

    I tried your db and could not fault it. Do you mean when a user enters the date on the first tab (Height and Weight) and then clicks on the next tab?.. (Cause if that is true I can not make it do anything strange) Sam
  15. Sammy B

    Adding records to filtered form.

    I sent the Database to your hotmail account. The first one had a glitch but the second seems to work ok. Sam
  16. Sammy B

    Opposite to Val

    I found this in MS Access help. (I know if you do not know what to look for it does no good but I just came accross it one day.) Str Function Returns a Variant (String) representation of a number. Syntax Str(number) The required number argument is a Long containing any valid numeric...
  17. Sammy B

    Newbie: Designing a database in access

    What you are trying to do with limited knowledge is probably going to drive you nuts. You had best find someone to help you or hire a programmer temporarily. I don't believe anyone here has the time to walk you through such a complicated database. Best get some good books and a warm fire! Sam :)
  18. Sammy B

    Adding records to filtered form.

    Ok, I have it. It is about 5:50 AM here and once I wake up I will do my best to get this done. Talk to you later. Sam
  19. Sammy B

    append memo

    Yes. You need to do something like this. Me![My Memo] = Me![My Memo] & "other stuff" Sam
  20. Sammy B

    Basic Filter Problem

    Try this. Sam
Back
Top Bottom