Search results

  1. I

    Listbox - Horizontal instead of Verticle Display

    I'm not sure if this is what you are after - but I did something similar recently. Create a number of labels, name lbl1 - lbl15. Based on your SQL query, populate and display these labels as in the function SetUpLabels. the On Click property from each of the labels, will call the function...
  2. I

    RecordCount

    varunmathur If the 'documents found' are displayed in a Combo or List box, then you can get to it via the following code- foundDocCount = Me!ListBoxName.ListCount If this doesn't do it for you, then you may need to provide a bit more info on how you currently get the list and count.
  3. I

    form field not accepting date

    gguy, I'm not sure what it is that you are trying to do. If you want to add the code to the On Current Event, then it is - me![StartDate] = Date() If there is something else you are wanting to do, you will need to explain further.
  4. I

    Get record number of newly created record.

    Travis, tried the procedure you provided but it comes up with the following error on the .Update statement for rstContact:- ---------------------------------------------------- Run time error '-2147217887(80040e21)': The changes you requested to the table were not successful because they...
  5. I

    Msgbox

    I'm not sure of the value of response but try:- if response = vbNo then.... (same for vbYes, vbCancel etc)
  6. I

    Get record number of newly created record.

    The autonumber index field doesn't help as I need to get the keys of the site and contact records to populate the index field. The datetime field may work in this particular case, but was hoping there was some method that was more certain to be unique and more elequant. Thanks guys.
  7. I

    Get record number of newly created record.

    I have an unbound form in which I need to update two tables (site & Contact) with new records, and create an entry in an index file - I use "INSERT INTO" to update the tables. The two tables are both keyed with an autonumber (they have a many to many relationship). Can anyone help me with how...
  8. I

    Getting The Name Of a Pressed Command Button

    Sorry for the redundant info there - I have only just discovered that there can be multiple pages for a thread - didn't see the last half dozen replies. Glad to hear you are up and going.
  9. I

    Getting The Name Of a Pressed Command Button

    You can use the screen.activecontrol property to return the name of the selected command button. I have used this in a form with multiple buttons, assigned a tag to each button, and called a common function and processed based on the tag - nice and clean using a Select case structure. Have...
  10. I

    Refresh combo box and form select list.

    Thanks Dave, The "OpenForm,,,,,acDialog" was spot on - everything done in the right sequence and listbox refreshed. Many thanks also to IIkhoutx and boblarson for your time and input. Peter.
  11. I

    Refresh combo box and form select list.

    I am working at ensuring I have all recommendations made to the code. However, I still do not understand the issue with the openform. the openform command opens a modal popup form which sets the global variable gint.... I have also put a msgbox (say msgbox2) in the popup form, followed by a...
  12. I

    Refresh combo box and form select list.

    I will fix up the .me and !me's. The SQL is fine - I always check it in a query. I may not have stated my main concern clearly. If I have an "OpenForm" statement at the top of a procedure, it appears to execute all following commands in the procedure before the OpenForm. After the Openform...
  13. I

    Refresh combo box and form select list.

    thanks for your help to date - I am working through the form to make sure I am requerying everything - the form contains a number of combo boxes, list boxes and a subform with more of the same. I have attached a portion of my code below which is a procedure in the subform - this may not be...
  14. I

    Refresh combo box and form select list.

    This is what I have been doing, but it doesnt make any difference. To update the index file, I use an INSERT INTO statement which appears to update immediately. The normal form close ( and docmd.close .... acSaveYes) with requery after is the problem. It could be to do with the position of the...
  15. I

    Refresh combo box and form select list.

    I have a form which has a select list as it's record source and am using a combo box on the form, with a select list behind it, to select a specific record and go to it to fill the form. This all works okay until I create a new record. Basically I open a form to enter Client info and another...
  16. I

    Update list boxes with a twist.

    Thanks Travis, except for a missing FROM in the Delete Statement it worked a treat. thanks mate - you're a legend.
  17. I

    Update list boxes with a twist.

    Thanks a lot, Travis - I will try it in the morning.
  18. I

    Update list boxes with a twist.

    I have two tables, Company and Keywords, which have a many-to-many relationship. I have build an index file which is keyed on the id of both tables. To update the keywords associated with a particular company, I have a form with two listboxes. List1 is a select list of all keywords (from the...
  19. I

    Print out contents of sub-form.

    Rich, The report idea would be ideal as it would allow me to add additional text around the form (Heading, date etc). However, the sub-form is used to enter comments for email and will not be saved - ie it is unbound. How do I get the report to pick up that info or build the Where clause...
  20. I

    Combo Box / Exiting

    Why don't you make it so that it only performs the action when you click on the selected item - I think the click action is the same as enter. Sub Combo90_Click() ' Find the record that matches the control. Me.RecordsetClone.FindFirst "[ID] = " & Me![Combo90] Me.Bookmark =...
Back
Top Bottom