Search results

  1. K

    FindFirst problem

    Hi I am having problems with FindFirst. I am trying to search for a word in a specific text field in a table. The text field is not a key field but is indexed. Prior to calling the following code, varSearch (a string) has been assigned a value by user input. Assume that value is "England"...
  2. K

    Selected item not found

    In a listbox (DisplayResults) when a user selects an item you can use code to find that item e.g. -------------------------------------- Set rs = Me.RecordsetClone rs.FindFirst "[WordsID] = " & Str(Me![DisplayResults]) Me.Bookmark = rs.Bookmark...
  3. K

    What am I doing wrong?

    I want to assign a Listbox to a variable (the listbox name not the contents) e.g. Dim SelectedList as as ListBox Select Case whatever case 1 SelectedList = ListBoxName goto OtherCode case 2 etc End select OtherCode: SelectedList.Requery The error message I get is...
  4. K

    CurrentDb

    HI folks I see this code commonly Dim db As Database Dim rst As Recordset Set db = CurrentDb Set rst = db.OpenRecordset("yourTableName") To what does CurrentDb refer? Does it refer to an actual table that is open or is it an object like 'Recordset' and 'Database'? I previously posted a...
  5. K

    Slow action

    Hi I have a pop-up form as part of my project which contains 4 unrelated tables. Each table has a AutoNumber as the key and one text field. The record source for the form is SELECT tblFractions.*, tblUnitsOfMeasure.*, tblIngredients.*, tblPreparation.* FROM tblFractions, tblUnitsOfMeasure...
  6. K

    QBE problem

    I am using the following crieteria in a Query Builder Like "*" & [Forms]![Form1]![Search2] & "*" Basically a list boxes displays all the records in the table until the results of Search2 changes. It then only displays the records that match Search2. My difficulty is that it displays records...
  7. K

    Can a combo box stay open

    Combo boxes normally open & close on the click of the down arrow. Is there any way of having it already open when the form opens and staying open? Thanks
  8. K

    Subform referencing

    An answer to a recent post gave me code to use when referencing a subform forms!frmMain!subfrmMain.form!mycntrl.visible = false As part of this is used frequently for other fields I thought I could save code if I assigned it to a variable ie Dim varsubName as String varsubName =...
  9. K

    Subform problem

    Hi I am having trouble with subforms In the Public module I have: Public varRecipeID As Integer Public RecipeClone As Recordset I have a tab control set up with a data entry subform on one page and a viewing form on another When the data is saved I want to switch to the viewing page with...
  10. K

    Tab control with no tabs

    I was setting up a form with TAB control but because of the size of the fields on the tab page, the Tabs move off screen. It really is a full page vertically, with command buttons to the right. All the fields fit on a normal form Anyway, I found that if I have no tabs I am able to use the space...
  11. K

    Subform questions

    Can someone answer some simple questions for me please? From the main form, what is the syntax to set the focus to a field in the subform? How do I hide or make visible a field on the subform during the operation of a procedure on the main form? Does every field on the subform have to be...
  12. K

    Does anyone know why?

    Attached is a simple database. It is purely a mock-up to demonstrate my question. There are two forms that are identical except for their source. In Form1 the Record Source is a table. In Form2 the Source is an SQL statement. I am asuming that I have set everything up correctly but, knowing me...
  13. K

    Microsoft Jet database cannot find a record ....

    Microsoft Jet database engine cannot find a record .... Hi all I hope I can describe my problem becasue the database is too large to upload I have a database with two tables linked on one field. The data source for the associated form is a query on both fields with an Inner Join. The field...
  14. K

    On Insert vs On Change

    In a data entry form, when any field on the form is changed I want to enable a button that gives the user the ability to clear the data they have entered. I can place the necessary code in the "Before Insert" event, but it relates to a new record only. Is there an equivalent for an existing...
  15. K

    Text Box vs Combo Box

    In a small application I am using there are two tables. In the main table there is a relationship with another. The main table stores only the Record ID of the item in the second table but a look up box displays the item name. Standard stuff. On the associated form, if I use a combo box, the...
  16. K

    Staying in Open Form

    I have a form which opens a subform when the user clicks a button. The form is opened using the "DoCmd.OpenForm" method. The subform then displays a field that lists all the records in a database. I want the focus to stay on this form until the user selects one of the records. What is...
  17. K

    Width of list box

    I have a form with several list boxes. There are occassions when I want to change the width of them. There is no question that the width changes but it places a horizontal scroll bar which I don't want. I have ensured that the total width of the columns is smaller than the width of the list box...
  18. K

    Removing highlight from list boxes

    I have a form with two list boxes showing data from two different tables. The user double clicks on an item in the first list box which puts the value into a separate text box. They then select one or more items from the second list box which combine the answers in the text box. The resulting...
  19. K

    Macro to VBA conversion

    I use the following macro to print a single record onto a form. What is the equivalent VBA code? Action: Open Report Action Arguments: [RecipeID]=[Forms]![Recipes]![RecipeID]
  20. K

    Inserting text into a memo field

    Forgive me if this question has already been asked and solved. Just point me to the thread. Basically what I want to do is add a specific piece of text to a text field / memo field (at the point where the cursor is) on the click of a button. I then want the cursor to be active at that point so...
Back
Top Bottom