Search results

  1. GolfProRM

    Hiding/Showing a Field

    With continuous forms, anything you do to change the visibility of an item will affect the same item across all of your records.
  2. GolfProRM

    Hiding/Showing a Field

    Okay... the best way to hide the field on a continuous form is to use the current event of the form. Go to the form properties, and select the current event - use the code builder to paste this code: if me.Check20 then me.LimitedEditionTotal.visible = true else...
  3. GolfProRM

    Hiding/Showing a Field

    To make this easier, what is the name of the checkbox you are checking, and what is the field you're trying to make visible? I was assuming you were trying to make a textbox visible (you'd put the name of whatever field you want to make visible in place of textbox). It doesn't have to be a...
  4. GolfProRM

    IIF/OR Statement

    This works for me also (compared to FoFa's): CASH_: IIf([Front]="QDV " Or [Front]="PDV ","-" & Format([cash],"Fixed"),Format([Cash],"Currency")) You're referring to PDF, but your code says PDV, so that may be some of the confusion. EDIT -- that's why the first suggestion didn't work -- you...
  5. GolfProRM

    IIF/OR Statement

    Okay, so I'm slightly confused. Are you trying to make the numbers negative if the file equals QDV or if it doesn't equal QDV? CASH_: IIf([Front]<>"QDV " And [Front]<>"PDV ","-" & Format([cash],"Fixed"),Format([Cash],"Currency")) Based on the code listed, I changed the OR to an AND, so...
  6. GolfProRM

    Hiding/Showing a Field

    Continuous forms throw a whole new wrench into things. Visibility will affect every record in the form, since Access basically says that there is only one text box, no matter how many rows you have. As far as making it visible on true only, your code would be something like this: if...
  7. GolfProRM

    Hiding/Showing a Field

    You'll want to use the code builder in this case -- it'll open up the VB code window. The Me term refers to the current form, saving some code vs typing forms![formname].controlname Me.controlname is the same thing as long as the info is on the current form. Just replace fieldname with the...
  8. GolfProRM

    SQL INSERT : What's wrong with this statement??

    Gotcha... Didn't realize you were holding the data from a previous form. As long as it works, that's all that matters! :) Glad it's working now!
  9. GolfProRM

    Hiding/Showing a Field

    In the field properties you can set the visible property to no. Then on the checkbox after update event, you can add the line of code me.fieldname.visible = true
  10. GolfProRM

    SQL INSERT : What's wrong with this statement??

    is there a reason you need to store it in a public variable? Could your SQL statement just use Me.Dob as the value?
  11. GolfProRM

    IIF/OR Statement

    any chance you could upload a copy of your database so we can look at the system and figure out what's going on?
  12. GolfProRM

    SQL INSERT : What's wrong with this statement??

    Access stores all date values as date/time, so when you enter just a date, access stores the date, and the time as midnight. What you can do is set the format of any fields that use this date. You can set it to view the date as a short/long date format so you only see the date value.
  13. GolfProRM

    IIF/OR Statement

    CASH_: IIf([front]="QDV " Or [front] = "PDF ","-" & Format([cash],"Fixed"),Format([Cash],"Currency")) You have to make the comparison on each side of the OR statement. the above should fix it.
  14. GolfProRM

    SQL INSERT : What's wrong with this statement??

    DoCmd.RunSQL "INSERT INTO tblappointments ([apptdate], [patientno], [pfname], [psname], [address],[dob]) VALUES (#" & [cboapptdate] & "#, '" & [strpatientno] & "', '" & [strpfname] & "', '" & [strpsname] & "', '" & [straddress] & "', #" & [dtdob] & "#)" The code wasn't quite right -- there...
  15. GolfProRM

    Rather Complex Problem

    Build an update query that updates the table, then set your generate button to run the query right after the records have been generated.
  16. GolfProRM

    Calculation in a table

    The recommended solution would be to build a form to view the data you need, then create an unbound textbox with a control source that completes your math. Storing calculated data in a table is generally not recommended. The nice thing about the form is that whenever the cost or percentage...
  17. GolfProRM

    Help with query to do counts!

    My suggestion would be to build an unbound form that you can pull up. In that form, you can use textboxes that utilize the DCount function to pull the data. If you're unsure how to use DCount, I'd recommend Access help for a start, and then you can search the forum for all sorts of Dcount...
  18. GolfProRM

    Form keeps opeining minimized, and i'me unable to maximize it.

    I think gearcam is running Office 2007.
  19. GolfProRM

    DLookup statement problem

    the single quote has to go around any field that has a string value. The issue here is that the AND statement needs to be within quotes. If IsNull(DLookup("[UserID]", "tblUsers", "[UserID] = '" & Me.txtUser & "' And [UserPWD] = '" & Me.txtPWD & "'")) Then code syntax can be a pain...
  20. GolfProRM

    DLookup statement problem

    Your if your UserID is a string, you'll need to have the dlookup put a ' around the field. Dlookup("[UserID]", "tblUsers", "[UserID] = '" & me.txtUser & "'")
Back
Top Bottom