Search results

  1. R

    gotorecord problem

    Set this up in the On Load event Dim rst as DAO.Recordset Set rst=Me.Recordsetclone rst.findfirst "[Date Field]=#" & date & "#" if rst.nomatch then docmd.gotorecord Record:=AcNewRecord Else me.bookmark=rst.bookmark End if Set rst=nothing
  2. R

    Forms/Subforms

    Have you double-checked that the values in the combobox match exactly the name of the corresponding subform? You might have matched the value up to the source object. That won't cause a problem but it's not going to make the sub work. Remember a subform has basically two parts to it. The...
  3. R

    Two SELECT statements in one query

    Study up on union queries: SELECT Field0, Sum(Field1 * Field2) FROM Table1 WHERE Field3 <> 'text' AND Field4 >= Forms!Form1!txtbox1 and Field4 <= Forms!Form1!txtbox2; UNION SELECT Field0, Sum(Field1 * (Field2/100)) FROM Table1 WHERE Field3 = 'text' AND Field4 >= Forms!Form1!txtbox1 and...
  4. R

    GoToRecord problem

    Oh, sorry I forgot to let you know. In 2000 you need to set a reference to the Microsoft DAO 3.6 library. That'll fix that.
  5. R

    Message box for finding records

    Sorry Naterial... a was a little brief on my instruction again. Change what's in red to meet your database names: rst.FindFirst "[ID Field]=" & Forms!FormName!ComboboxName.value
  6. R

    Message box for finding records

    You'd have to find the record for each recordset
  7. R

    Message box for finding records

    You'll always need the update commands whenever you change data in a recordset be it adding or editing.
  8. R

    Message box for finding records

    You know I jumped the gun a little on my suggestion. You will need to add a feature to find the record first. rst.FindFirst "[ID Field]=" & combobox value Then run the edit.
  9. R

    Force data entry

    You can run a test in the subform's On Enter event. Test to see if data's there and if not give the message and set the focus elsewhere.
  10. R

    GoToRecord problem

    You're going to need to use recordsets Dim db as DAO.Database Dim rst As DAO.Recordset Set db=CurrentDb Set rst=db.OpenRecordset("[Table Name]") rst.FindLast "UserName='" & CurrentUser & "'"
  11. R

    Message box for finding records

    All you'd have to do is change .AddNew to .Edit I would suggest using a combobox to select the record.
  12. R

    Sending multiple (separate) e-mails based on results in query

    The SendObject command in A2k has a problem with it. Don't remember where I read but Microsoft knows about it and fixed it for 2002. In the meantime, are you using Outlook for your emails or something else? I can show you how to adapt your code to use Outlook and it works great.
  13. R

    Shift key

    Here's some code that I've perfected for myself. It's a little modified from code I found in Access Advisor. Best thing I've found so far. It's for anyone who likes to use MDE files for their frontends. Basically what it does is test whether or not the file is mde or mdb. Also works on adp...
  14. R

    Forms/Subforms

    I understand what you're trying to accomplish. If someone selects Baseball in the combobox then the Baseball subform will show up. And the other subforms will be invisible, yes? If so, the routine I gave you will work. Since you're pretty new, and maybe don't have any experience with VBA...
  15. R

    Forms/Subforms

    You could create a sub in the After Update event of the combobox. What I would do would work easiest if you name the subform control to match it's selection in the combobox. Then the sub would be Dim ctl as Control For Each ctl in Forms!FormName.Controls If Typeof ctl is Subform then If...
  16. R

    Form based on query creates problem

    Oops. Sorry about that. Thanks for the correct, Pat.
  17. R

    query a form

    Well I would first put the button on the main form. Then create a procedure in it's on click event like this: Assuming you have a number id for the records in the subform: Dim intID as Integer Dim intCount as Integer intID=Me!SubformName.Form!NameofIDField intcount=DCount("[ID...
  18. R

    query a form

    Well there's several approaches you can take. One, you can base the subform on a query. Two, you could create a command button that runs a procedure that will count how many awol's for whatever client is selected in the subform and display it in a messagebox or textbox. Do either of those...
  19. R

    Form based on query creates problem

    I understand more about what you're trying to accomplish. You want to have a separate table where you can create new price records and depending on the date of an order you want the right price selected, yes? Not sure which one was added but I can tell you that when you have a one-to-many join...
  20. R

    query a form

    You could create a query the groups by the client and have it count the field where awol would be.
Back
Top Bottom