• WSladygnome

    WSladygnome

    @wsladygnome

    Viewing 12 replies - 136 through 147 (of 147 total)
    Author
    Replies
    • in reply to: Select from a combo box or drop down list (2000) #650976

      It is under the Department Number, Department number is the bound column.

      Thanks

    • in reply to: Select from a combo box or drop down list (2000) #650519

      Hi right back fellow Texan.
      How ’bout that? It does run. To my eye doesn’t look a hair different than what I typed from Wendell’s original reply. But Hey! The machine knows, I don’t.
      However, as I suspected, it is showing all Departments in the selected Account range. Still no ability to choose a specific Department.
      Hmmph– I wonder if I could select a department on the form then run the query from the command button I created awhile back??
      Well the Query runs anyway. Thanks a bunch podner. yep

    • in reply to: Select from a combo box or drop down list (2000) #650420

      The RowSource for my Combo Box reads SELECT[Departments].[Department number],[Departments].[Department name]FROM[Departments;

      Departments is a table that has at this point about 20 departments with associated numbers. When I get this to work, I will finish filling it.

      I’m linked to some Read Only files. Plus the information I work with is considered “confidential”.
      hmmn Let me think about this a bit. I may be able to create a “dummy” base that has no real information, but is set up like my database.

      Thanks again

    • in reply to: Select from a combo box or drop down list (2000) #650417

      Here is what I’m getting when I try to reference the Combo Box in the Query

      Forms![Find Departments]!Combo0.Column(0)
      Undefined function Forms!(etc) Column’ in expression.
      Forms![Find Departments]!Combo0
      Treats this as a parameter – automatically adding [ ] around Forms! and Combo0

      I’m not sure this method will have the result I want, even if I get it to work. I looks to me like it would just pick up whatever value is currently in the column. No selection ability. Am I wrong??

      The closest I’ve gotten to what I need is the control button on the form. For this morning, I had the Macro open the form – selected my department (after making the dept number visible), and then ran the query from the control button.
      Since the form was open, I could then type in the correct Department number. On closing the query, the Macro continued to completion.

      My supervisor was not unhappy with this. It is much better than dragging out the manual to look up the Department number. As I said — really close.

      How do I do this?? It looks like it would have exactly the result I want.

      scratch

    • in reply to: Select from a combo box or drop down list (2000) #650383

      Forms![Find Departments]!Combo0.dept-nbr.

      I guess this represents complete confusion. I don’t know VB. I thought I was copying Pat’s solution. Except substituting the name of the column. The one I want would be column 0 per your explanation.

      I have no idea how to do this. — I have changed the name of the column to Department number.

      I do not know Visual Basic. I mean I REALLY REALLY do not know it. Please be patient with me.

      Thank you for your interest

    • in reply to: Select from a combo box or drop down list (2000) #650333

      This looks very similar to Wendell’s original reply, which just resulted in the column being skipped. Curious, because that solution is exactly what Access help says will work. Maybe I’m just typing it wrong. Yours is a bit different, I will try it.

      Dummy didn’t name her Combo Box, so it is called Combo0. The column that the Department number is in is dept-nbr.
      So I’m writing this as Forms![Find Departments]!Combo0.dept-nbr.
      We shall see.

    • in reply to: Select from a combo box or drop down list (2000) #650330

      This gets me closer. Much closer. In fact, if push comes to shove, this will work. I am frustrated though. I really want the Department number to be automatically entered into the criteria for the Query. I was expecting something like the old TAKE, PUT commands from Basic. Essentially TAKE value from Here-PUT value There. Doesn’t exist in Visual Basic?

    • in reply to: Select from a combo box or drop down list (2000) #650120

      <>

      No. It will always be either a single account. (Which can be accomplished by typing the same beginning and ending account), or a range of accounts.
      Sometimes we will require the entire range, regardless of what Department the account is assigned to. Sometimes we will require only the accounts, within the range, that are assigned to a specific Department.

      <>

      Actually, yes, and quite beautifully. thankyou The thing is, we have over a hundred Departments. Rather than having to drag out the list and look up the number before typing it in, my Supervisor wants to be able to select from a list -by name- of Departments and have the appropriate number inserted into the Query. The reason I cannot use Department Name directly is that the Read Only Data Base I link to for Account numbers has them assigned by Department Number only.
      Thanks for your interest.

    • in reply to: Select from a combo box or drop down list (2000) #650063

      Okay, let me start from scratch here. What the original request from my Supervisor was. Where I’ve gotten with it, and what he wants now. I may be off on a totally irrelevant track.
      Original request:
      “Build a Query that will compute the MTDC for an account.” ( MTDCis made up of specific expense codes)
      Did That.
      “Can I request a range of accounts?”
      Changed to a Paremeter Query by putting Between [Type the beginning Account] and [Type the ending account] in the criteria for the account number
      ” We need to be able to request a specific Department as well”
      Did this with help from this site. At this point the Department number has the crieria [Type Department number] or [Type Department number] IsNull.
      Thought I was through. This does what is needed quite efficiently, and I got it to work in a Macro that exports the results into Excel.

      Now —
      ” I would rather not have to look up the account number each time. Can we have a list of Departments to choose from?”

      Based on the way Access help described a combo box, I thought that was what I needed. I have created a table of Department names and associated Department numbers. The Department number is the primary field. Then I created a Form with a combo box with two fields. Department number is the bound field, Department name is all that shows in the drop down list.

      What I need this to do is insert the department number into the Query criteria upon selection of the Department name. As long as I’m asking, it also needs to select all departments within the range if there is no Department selected.

      If this is not the way to accomplish my goal, any guidance would be appreciated.

    • in reply to: Select from a combo box or drop down list (2000) #650022

      Typing this into criteria doesn’t result in a dialog box of any kind. It just skips that field on the Table the the Query creates.
      Maybe I need to elaborate. This combo box doesn’t appear to do anything at this point. The form comes up, click the arrow and you get a list of names. Choosing a name — does nothing.
      Sorry to be such a know-nothing.

    • in reply to: Select from a combo box or drop down list (2000) #650008

      Thanks Wendell, I will give this a try right away.

    • in reply to: Parameter Query (2000) #649386

      Oh, I’m going to LOVE this site. It does exactly what I wanted thankyou

    Viewing 12 replies - 136 through 147 (of 147 total)