Search results

  1. E

    Sorting strings that contain text and numbers

    SELECT IIf(Len([NameOfField])=6,[NameOfField],"0" & [NameOfField]) AS FormattedField FROM NameOfTable ORDER BY IIf(Len([NameOfField])=6,[NameOfField],"0" & [NameOfField]); The idea here is that for all the fields with 6 characters (i.e, 695+00 and 818+12), a leading zero is placed in front of...
  2. E

    Line Number in Query

    Check out "How To Create an Auto Number For Each Row of Your Query." at http://ourworld.compuserve.com/homepages/attac-cg/AQryTip.htm HTH, Edward
  3. E

    Group and Count field values

    SELECT LOB, DIV, Count(Project_Stat_Code) AS CountOfProject_Stat_Code FROM [TableName] GROUP BY LOB, DIV; HTH, Edward
  4. E

    Text field comparison

    Use the StrComp function
  5. E

    Query records by "no" criteria

    Sure you can. Create a query that contains only the fields with Y/N datatypes. Include the date parameter field in this query. Create a user-defined field (AtLeastOneNo) that calculates the product of all the Y/N fields. For example, "AtLeastOneNo: [YNField1]*[YNField2]*[YNField3]*[YNFieldN]"...
  6. E

    SubForms/Last Record

    I have a mainform/subform. I would like to move through each records using the main form's built-in navigation buttons (i.e., first, previous, next and last). However, I want the records inside the subform to begin with the last record instead of the first. So for example, instead of starting...
  7. E

    Limiting # of Open Databases

    I have a database that resides on a shared network so that many users of the database can open it up and use it simultaneously. However, I want to limit the number of users who can use it to only 5. So that when a 6th user wants to use it he will get a MsgBox that reads "The maximum number of...
  8. E

    Purging Records Automatically

    I have a table of invoices that are growing too huge for my database to keep and still have it run efficiently. Fortunately, I have found that I am only required to keep a 2-month backlog of invoice for my department's purposes. In other words, I want to purge all records (DeleteQuery) from my...
  9. E

    Tabbed Forms.

    Tried it. It worked like a charm. You da man! (or girl! if your a woman).
  10. E

    Tabbed Forms.

    I would sure appreciate the code if you have it. Thanks.
  11. E

    Tabbed Forms.

    I have a tabbed form with 4 different tabs (or pages). Is there a way I can cycle through all the fields of the form using the tab button. For example, when I reach the last field on pg 1 and press "tab", I want to give the first field in pg2 the focus. And so on until the last records in pg...
  12. E

    Closing Main Form

    I have a main form that I use as the switchboard form. It helps me navigate through various other forms (around 3-4) I have in my application. I want to include an OnClose procedure in VBA code that will prevent me from closing the main form until all other forms are closed. I want the Main...
  13. E

    Subform problemo...

    I have a Main form (MainForm) with 2 subforms (SubForm1 and SubForm2) embedded inside. I wanted to add code into the MainForm_FormCurrent() procedure that would cause Subform2 to become invisible whenever MainForm advance to a record where there was no vlaue displayed in SubForm1. This is what...
  14. E

    ListBoxes

    I was wondering if there is an event I could invoke in MS Access that would check to see if there is any data in a list box once the form is loaded. I have a listbox whose underlying query changes from day to day based on a Date() criteria. There can be 5 records one day, 12 records another...
  15. E

    SetFocus

    I was struggling with a function using the Form Current event. I tried to enable and disable a field (field1) based on the value of a textbox (textbox1). If textbox1 equals Y then field1 was enabled and if textbox1 was equal to N then Field1 was disabled for every new record you select. So I...
  16. E

    SetFocus

    I was struggling with a function using the Form Current event. I tried to enable and disable a field (field1) based on the value of a textbox (textbox1). If textbox1 equals Y then field1 was enabled and if textbox1 was equal to N then Field1 was disabled for every new record you select. So I...
  17. E

    Record Navigation

    Rightamundo, Chris. Now I just need someone who can help be construct it. Think you're up to the task. Sorry to keep bothering you with this. It's just that I'm at my wits end. Any help is appreciated.
  18. E

    Record Navigation

    Pretty cool. But I need the function to move to the next instance of the new number in sequence. I don't know if this does the trick. I appreciate your tip, though. Thanks.
  19. E

    Record Navigation

    Take the following as an example: 10,10,10,10,20,20,30,30,30,40,50.... These #s represent employee id# sorted numerically in ascending order in a query I maintain (QueryA). However, I would like to create command button with VBA code that would allow me to advance to the record which has the...
  20. E

    ListBox problem

    I've used the DLookUp() function but it did not update the "Comments" field when I clicked on a different selection from the listbox.
Back
Top Bottom