Search results

  1. M

    How filter date is null using check box

    Shane, The code I gave will work for filtering form records, not for filtering a report run from the form. What is the code you are currently using to open your report? We'll need to adjust it to add a Where condition based on the ckDateFilter control.
  2. M

    Rookie banging head against wall with iif

    Rachelle, You're welcome. No, you would not be a jerk to do that. Queries (and code, and sometimes controls on forms or reports) are the place to do your calculations. Table fields are rarely a good place to store calculations, and never when they are this simple. We were all beginners at some...
  3. M

    Rookie banging head against wall with iif

    What Galaxiom is saying is that you should put the calculation into the recordsource for your report. If the report is currently fed directly by a table, change it to a query. In the query, add a field -- let's say Wk2Calc -- like this: Wk2Calc:Sum(IIf([Wk 2 Total]+[H2]>245,245,[Wk 2...
  4. M

    open query based on many choices

    You're off to a good start for a beginner, but you have a few issues, one of which is that you were overwriting your criteria with each new criterion. Another biggie is that you're using multiple controls to define criteria for the same field, which requires separate handling to be done properly...
  5. M

    Prevent Duplicate Values with alert after user enters duplicate value

    You need to correct the table structure on the server, then refresh your table links.
  6. M

    Make search case insensitive

    Is it possible that the records have different characters altogether, not just ABC vs. abc, but ÀBC vs. abc? That could make the difference, because Access is not case sensitive regarding filter strings.
  7. M

    Help with export filtered records to a table from subform

    Angel, you don't have to maintain identical field names if you build and save an import specification (use the import wizard for your file, then before clicking Finish on the final page, click Advanced). This will also allow you to set field types and/or skip unneeded fields, and that way you...
  8. M

    How do I make form in MS Access query multiselections?

    First, your table structure is not normalized. Instead of a table per vendor with vendor name, beverage, food, price as the fields, I'd suggest a table for vendors with a primary key and vendor name fields and a table for items with the vendor's foreign key, item, and price. Second, your query...
  9. M

    Multiple entries from one form

    It sounds like you need a continuous subform to tblOrders to enter related data in tblMeters. You can limit the number of records allowed to be added to the subform with a check on the Before Insert event of the subform that the number of records doesn't exceed the number specified in the order.
  10. M

    Search Form

    Current week as an option could be as simple as setting it as the default value for your existing week field. For the rest, you may want to set up an option group to allow the user to choose among their date filter options, and enable the appropriate boxes according to user selection. If you...
  11. M

    Autofill form

    Google "Allen Browne subquery basics" and see if that helps.
  12. M

    How filter date is null using check box

    Hi Shane, Doing it in VBA should actually be very quick. Assuming the date start control is named dtDateStart and the check box named ckDateFilter, you would put the following code in the AfterUpdate event of that control: Private Sub ckDateFilter_AfterUpdate() Me.FilterOn = False If...
  13. M

    Question Inserting a default value from code

    RuralGuy's questions aside (they are relevant to solving this), you can't just write a SQL statement in VBA and have it execute. You need a command to do so, such as: DoCmd.RunSQL "INSERT INTO T_Cases.OfficerID SELECT Forms.F_FileCases!txtCaseID;" But it sounds like what you want is a default...
  14. M

    Copy data from local Access table to linked SQL Server table

    I have a database that also updates to SQL server tables from local tables. I don't have identical schema for the tables, however. On the local tables, I've added fields to indicate whether the record has been copied to the server (boolean), when, and by whom, and another boolean field to...
  15. M

    Starting point for a database

    Charlie, I'm happy to be of assistance. It sounds to me like a 1:1 of visit to accommodation, yes? And possibly a 1:1 of visit to accommodation sought as well? No worries, this is not going to be hard to sort, and you've got a good start on your tables.
  16. M

    Question Create duplicate sets of data for parent with children and childrens children

    Susi, If you gave specific field and table names, I could give you more exactly, but here's a rough go to give you an idea. In the OnClick event for your button, you'll have code to run an append query to copy the data. The query could look like so, approximately: INSERT INTO tblB (...
  17. M

    Starting point for a database

    Okay, I'm looking at your database now, but I'd appreciate clarification on accommodations. The many types of accommodation had by each client represent all the types ever used? Or the potential types s/he could use? And the types needed are what? Each visit has one type of accommodation that...
  18. M

    Filtering a listbox using a text box

    You're welcome. Good luck.
  19. M

    Filtering a listbox using a text box

    Also, assuming partname is text, If Not IsNull(Me.partnumbertxt) Then strRS = strRS & " WHERE partname = " & Me.partnumbertxt End If may work better as If Len(Trim(Me.partnumbertxt)) > 0 Then strRS = strRS & " WHERE partname = " & Me.partnumbertxt End If or If (Me.partnumbertxt) > " a" Then...
  20. M

    Starting point for a database

    Charlie, how about posting your table structure in full (fields, types, relationships)? All the forms, queries, and reports you'll want will be dependent on getting these right and details will aid in helping you. It sounds like you're off to a good start with normalizing your data. Also...
Back
Top Bottom