Search results

  1. C

    Repeating Labels with Access

    Have you looked at the Microsoft Knowledge base article, "ACC2000: How to Skip Used Mailing Labels and Print Duplicates (Q231801)"? This shows you how to ask the user for the number of labels to print. I've used it in a number of systems. P.S. The Knowledge base is at support.microsoft.com
  2. C

    how to pass values from a form to another

    This code would go in the On Click event for the button that opens the second form: Dim DocName As String DocName = "fFormTwo" 'I use acAdd, you may want acEdit here... DoCmd.OpenForm DocName, , , , acAdd 'Set Defaults for Approver's Id & other stuff...
  3. C

    Complex query used in report

    Create the query first. You'll need to join the four tables in the query. Remember that there are different kinds of joins. You will select the userid by putting a value in the Criteria row for your main table (look up Parameter Queries in Help, to see how you can have the query call for this...
  4. C

    Filter by Date

    Off the top of my head: strFilter = "[ExpiryDate] = #" & Me.srcExpDate & "#" And I would make sure that srcExpDate is formatted as a date/time field. Let's try for extra points: strFilter = "[FIRST_NAME] like *" & Me.txtFIRST_NAME & "*" [This message has been edited by Chris RR (edited...
  5. C

    grouping in a report

    For the positive and negative amounts, I would add two new columns to your query, and I'm assuming that your report is based on a query, not a table. The new fields would look something like this: Pos_Charge:Iif([MyTable]![ChargedAmount]>0,[MyTable]![ChargedAmount],0)...
  6. C

    Summary Report / OnFormat / OnPrint

    What if you put an invisible field on your report, right next to your current amount field? The control source for this field would be something like (watch the syntax, I'm guessing here Iif([Amount]<0,[Amount],0) and give it a name like Neg_Amount. Then you can do the same kind of summing...
  7. C

    can I add new columns to table through forms

    The first question is, "Why?" What you need to make sure that you are NOT doing is something like, say, having the users add a column for "December" when they have December data to enter. If they need to do this, your tables are not structured correctly. In fact, I am having a hard time...
  8. C

    queries and dates

    It'll probably mean doing a Dlookup, but a lot depends on the structure of your fiscal year table. Years and periods alone won't help; do you have starting and ending dates in there?
  9. C

    Combo Box filtered data

    Base your combo box on a query that will use the Purchase Order from your Payment/Invoice form in its criteria. Then, in the AfterUpdate for the purchase order field, do something like this: Me.cboCLIN = Null 'null out the combo box Me.cboCLIN.Requery 'requery it
  10. C

    Kinda confused.... :(

    I'm curious as to why you have this in the BeforeUpdate event. Don't you want to run this code after the user has entered a new zip? Or are you trying to fill in the city and state when the form opens?
  11. C

    Filter using multiple criteria

    What I usually do is to create in filter in the After Update for each combo box, then make the user click a separate "Filter the Records" button to actually apply the filter. The code in each individual "after Update" sub usually looks something like this: txtCust = Me.Cust If txtCust <> ""...
  12. C

    Enable Field if selection is "No"

    Remove the colon from your Else statement: Else: Me.disposal.Enabled = False should be Else Me.Disposal.Enabled = False
  13. C

    Counting words, lines in a text box

    The number of "lines" is going to depend on one of two things. You are either going to need to find carriage ejects in the field, and count that, or you are going to arbitrarily pick a line length (that's easy...do a Len() to find the how many characters in the field, then divide by your...
  14. C

    Merging Text fields

    OK, I'm probably missing something here, but couldn't you set up a text box (named something like txtLONG_ADDR) with a control source like: =[ADDR_LINE1] & " " & [ADDR_LINE2] You might want to do some editing, too: =Trim([ADDR_LINE1] & " " + Trim([ADDR_LINE2]) That "+" sign is intentional; it...
  15. C

    Query Results in Message Box?

    OK, I was assuming that wrek would use Dlookup to figure out whether the customer name was already in the table.
  16. C

    autocounter & Print one page

    Some questions and maybe a few suggestions to get you started. "Autonumber" won't do a record count in a printed page. It's an automatically generated number that can be used as a unique record key. You need to look at the COUNT function to do a record count. Don't name your fields text1...
  17. C

    Query Results in Message Box?

    Lots of stuff not directly related to the msgbox. For my own convenience, I usually put these kinds of Dim statements right up at the top of the form module. They aren't specific to a single sub, can be defined once & used anywhere in this module. So any other coding in this form could &...
  18. C

    Query Results in Message Box?

    Off the top of my head (where txtCustNo is the text box on your form), try this. The logic here is that you just need to display the form field, not what's on file: Dim strMsg As String Dim strResponse As String Dim strStyle As String 'lots of stuff goes here... strMsg = "Found Customer " &...
  19. C

    Checking for duplicate data

    You can do a Dlookup to check for duplicate name, and you wouldn't be able to enter a duplicate student ID, if that's the key. But I agree with ian_ok, a duplicate name is certainly possible.
  20. C

    How To - Email / Reports

    I've done this, but my method requires VBA coding skills. The basic idea is to start with two things. One is a query that will tell you should get email, and their email address, and you have this already. The other is to create a report that contains the info that you want to send (we take...
Back
Top Bottom