Recent content by bobbybeers

  1. B

    form control recalculate

    what I meant to say is: I have this and it works great: =DLookUp("[03_END_PREP].[END_PREP_DESC]","03_END_PREP","[PDS_PREP] = '" & [PREP_A_subform] & "'") I tried this and it doesn't work (I can't explain why): =DLookUp("[10_OPTION].[OPT_DESC]","10_OPTION","[PDS_OPT_NUM] = '" &...
  2. B

    form control recalculate

    I have two combo boxes on the same form and for some reason one recalculates and updates and the other one doesn't. The control source for each is as follows: =DLookUp("[03_END_PREP].[END_PREP_DESC]","03_END_PREP","[PDS_PREP] = '" & [PREP_A_subform] & "'")...
  3. B

    subform scroll bar scroll to bottom

    heres a more elequent way by using a loop for record navigation: simply call MOVE_CURSOR in your main operation and you can set rows for however many rows you want to move up Private Sub MOVE_CURSOR() Dim ROWS As Variant ROWS = 8 Do Until ROWS = 0 DoCmd.GoToRecord , , acPrevious...
  4. B

    subform scroll bar scroll to bottom

    OK, I figured out how to do this.... I know its cheesy but it does exactly what I want which is manipulate the scroll position on the subform detail section....hopefully it will help someone else out at some point. after I perform all my operations I simply move the position in the subform by...
  5. B

    subform scroll bar scroll to bottom

    I have a form and in the form is a subform. When I add a record with the following code, the subform detail scrolls in such a way that you can't see the record you just added...only a single blank new record. Can you set the scroll position so that I can see all the previous records including...
  6. B

    SQL statement in a form VB

    First just let me say thanks for providing insight on this, it is much appreciated. Now to get down to it, my query is quite complex which is why I didn't want to get into too much detail...essentially, what I am trying to do is run a complicated query that uses DLOOKUP to find a multitude of...
  7. B

    SQL statement in a form VB

    I tried your suggestion but it errors saying it cannot find the form object...any suggestions? SELECT [C1_PROJ] & [C2_PROJ] & [PS1A_PROJ] & [PS2A_PROJ] & [PS1B_PROJ] FROM Forms!CC_MAIN.CB_PROJ;
  8. B

    SQL statement in a form VB

    I want to create a button that executes an SQL statement in a form. The reason I can't just save a query and run the query from the form, is because the SQL statement needs to use a combobox value from the form. I've learned that docmd.runsql will not work for a simple select query.....does...
  9. B

    Running an SQL statement with combobox values

    well i've built the query and saved it as a query (with an existing table). Now, I want to copy and paste that sql language as part of a button on a form, except, I will take and replace the table name in the SQL with a value from a combobox on my form.....I just don't know how to write the...
  10. B

    Running an SQL statement with combobox values

    Hello all:) I have a form that has a combobox with table names in it. I want to execute a very complicated SQL statement but I want to put the table name (from the combobox) into the SQL statement. I'm planning on making a button to do this, but I don't know how to put the SQL statement in VBS...
  11. B

    export data with outputTo

    Hello all, I am trying to export the data from a form to a textfile by using the following simple piece of code: Private Sub Command188_Click() DoCmd.OutputTo acOutputForm, "CC_MAIN_PROJ" End Sub it works, but gives me the data like this...
  12. B

    combobox DLookup

    Thank you, Thank you, Thank you.... I didn't use any information from your last post - just followed the link in the previous post to the reference you provided and found out that I had the syntax wrong..... the ' was the problem. thanks again!! :)
  13. B

    combobox DLookup

    A note to help communicate what I'm trying to do: The combobox works fine - I want to take a value from it, use it to find a record on a table and then have a different text box give a value from a different field of that record. I'm not sure what that code you gave does, but it looks like...
  14. B

    combobox DLookup

    Actually I only want the first match....if it worked that would be great, but it just doesn't. one thing to mention, is that I'm putting the above statement in the text box's control source (as opposed to code). Doesn't work, I've tried all I can think of including...
  15. B

    combobox DLookup

    OK, I've read how to do this...really I have. I have a combobox value that I want to use which then based on the combobox value shows the value of another field for that respective record. Should be very simple - note, the recordset for the form is not the same table as I want to get the value...
Top Bottom