Re: Posted before didn't get a response- populating dropdown 2 sou
- From: babs <babs@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 13 Jun 2006 06:38:01 -0700
Let me do some explaining
Isn't Taxemempt# something that is
unique to a client?It is only unique to a client AND a JOB#
When preparing a quote you would typically build a form based on the Quote
table, and select a client from a combo box that is based on the ClientCORRECT
table. Any Client information you wish to appear on the Quote form can then
come along for the ride.
If the Taxexempt table is a duplicate of the
Quotes table except that it contains completed jobs, the better approach
would be to add a Yes/No field [Completed] to the Quotes table
Would always want BOTH. Anything in the taxexempt table is really JUST jobs
PRIOR to creating the quotes form in the database. Any NEW even completed
jobs in the quote form will show up in the dropdown for the quotes form- Do I
need a check box (default to YES)- to have the job# dropdown to be able to
display BOTH JOB#,taxeex from quote table and taxexempt table
You can
then build queries (including Row Source code) to choose open jobs,
completed jobs, or both. HOW woudl I do this to get BOTH. See prior write ups to see the 3 tables I have. Quote, client, taxexempt ( when pull all three in query not updatable)
In what event and on what form does the code appear? You reference setting
the Row Source of ClientID. Is ClientID a combo box? It seems you areYes the Code is attached to the after UPdate event of the combo box-
setting the Row Source of cboJob. Some description of your forms, including
their Record Sources, would help.
Clientid after a client is selected and the code populates the rowsource for
the combo box job# depending on which clientid was selected. The job# will
then show all previous jobs and their taxex# from the quoteform(based on a
query using quotetable and client table). Just to summarize - would like to
also include on the job# drop down - old jobs that are JUst in the taxexempt
table.
thanks for helping,
Barb
BruceM" wrote:
Maybe I misunderstand something here. Isn't Taxemempt# something that is.
unique to a client? If so, it should be part of the Client record. If not,
what is it? Remember, most of us are not in your business.
When preparing a quote you would typically build a form based on the Quote
table, and select a client from a combo box that is based on the Client
table. Any Client information you wish to appear on the Quote form can then
come along for the ride. If the Taxexempt table is a duplicate of the
Quotes table except that it contains completed jobs, the better approach
would be to add a Yes/No field [Completed] to the Quotes table. You can
then build queries (including Row Source code) to choose open jobs,
completed jobs, or both.
In what event and on what form does the code appear? You reference setting
the Row Source of ClientID. Is ClientID a combo box? It seems you are
setting the Row Source of cboJob. Some description of your forms, including
their Record Sources, would help.
"babs" <babs@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:679F36F9-1098-4E18-84B3-E260AC6C949D@xxxxxxxxxxxxxxxx
This is the code for the drop down for job# I am including the taxexempt#
because I want to set the value of a the taxex field on the form to
whatever
job#,taxex# they select in the drop down.
'This function sets the RowSource of ClientId, based on the value selected
in ClientId
sSql = "SELECT DISTINCT Job, Taxex, Jobdesc, ClientId " & "FROM
tblQUOTEJOE
" & "WHERE ClientId = """ & Me.cboClientId & """ " & "ORDER BY Job"
Me.cbojob.RowSource = sSql
I have 3 tables
Client- client id(PK), name, address, etc.
quotes-quoteid(PK), clientid, job#,taxex,rate, etc.
taxexempt table-ID(PK), clientid, job#, taxex
The taxexempt table just holds PREVIOUSLY done jobs and their taxex # but
would like to make them also available to the dropdown to be selected AS
WELL
AS the taxex values in the quote table. I tried to pull all three tables
together in a query but could only use the client and quotes table.
(that's
really why I put the taxex field in the quotes table. With ALL 3 tables
in
the query it is not updatable.
Thanks,
Barb
"BruceM" wrote:
I take it that you have a combo box on a form, but I do not follow the
details. When you say "populating the dropdown" are you referring to the
combo box row source? Why do job# and taxempt# appear in the same combo
box? What is the taxes table? Are you copying records from one table to
another? If so, that is at least part of the problem, as you should not
be
doing that.
What is the purpose of your database? What real-world situation are you
attempting to address?
As a possible answer to your question, you could try adding the word
DISTINCT after SELECT in the row source SQL. Another way of doing this:
select the combo box, click View > Properties, click the Data tab, click
Row
Source, click the three dots. In the query design view that appears,
click
View > Properties, and set Unique Values to Yes.
However, if your database is not set up properly, you may not get the
desired result. In that case, you will need to describe the database
structure and relationships.
"babs" <babs@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:488EA099-1583-4447-A325-CED0D6D24A0A@xxxxxxxxxxxxxxxx
I have a drop down list for job# on a form called quotes showing the
job#
and
taxexempt # based on client id. Right now I am populating the dropdown
based
on previous entries on the existing form that enter the data into a
table
called quotes. I would like to do either of two things. 1. Add these
entries(one entry per clientid, job#,taxexempt#) into another table
called
taxex table.
Definitely want to know at least this. Have the user be able to add
clientid, job#, and taxempt# to the Taxex table and it ALSO be able to
show
up in the dropdown as a choice as well as the records previously input
into
the quote entry form. Not sure how to pull from two sources and only
display
once if duplicates- for a given drop down.
Thanks so much,
Barb
- Follow-Ups:
- References:
- Prev by Date: Re: Help with Access form
- Next by Date: Re: Using a Word Document as a form in Access?
- Previous by thread: Re: Posted before didn't get a response- populating dropdown 2 sou
- Next by thread: Re: Posted before didn't get a response- populating dropdown 2 sou
- Index(es):
Relevant Pages
|