Pulling data from values selected in dropdown list-values back to

B

babs

Posted a while ago and haven't heard anything?? Most recent below and
previous items listed below that.


Did the pull data from the quote record- when just did it with the cost field
it worked great with not errors. Than added the rest and have problems -
anything wrong with the If code???????

See Below:

Private Sub cbquoteid_AfterUpdate()
If (Me.cbquoteid <> 0) Then
[cost] = Me.cbquoteid.Column(8)
[ClientId] = Me.cbquoteid.Column(2)
[Job] = Me.cbquoteid.Column(4)
[Divisor] = Me.cbquoteid.Column(5)
[GrossWeight] = Me.cbquoteid.Column(6)
[Pit] = Me.cbquoteid(7)
[TaxRate] = Me.cbquoteid(9)
[FuelperRate] = Me.cbquoteid(10)
[Markup] = Me.cbquoteid(11)
[OverallMarkup] = Me.cbquoteid(12)
[CartageRate] = Me.cbquoteid(13)
[AltCartageRate] = Me.cbquoteid(14)
[nontax] = Me.cbquoteid(16)
End If
End Sub

Also tried putting If on ONE LINE seperated by colons. Getting a number of
type mismatch erros. Check data type, size and format for
fields(taxrate,job, pit)and can't find anything. Something wrong with
syntax???

If [cbquoteid] <> 0 Then [cost] = Me.cbquoteid.Column(8): [ClientId] =
Me.cbquoteid.Column(2): [Divisor] = Me.cbquoteid.Column(5): [GrossWeight] =
Me.cbquoteid.Column(6): [Markup] = Me.cbquoteid(11): [OverallMarkup] =
Me.cbquoteid(12): [CartageRate] = Me.cbquoteid(13): [AltCartageRate] =
Me.cbquoteid(14): [nontax] = Me.cbquoteid(16)



Please help!

Thanks so much,
Barb






I have created a form to enter records for invoicing for shipment of trucks.
It includes the cost of the matl shipped the quantity, client id, client
address, dates, and some calculations of ex. cost*quantity of matl. There is
a step previous to this where some companies are receiving a quote based on
which would fill some(most-not all) of the fields for this form. I would
like the existing form (Invoice Entry) to have a drop down for a QuoteID and
have it fill the ex. cost, quantiy etc. Not all of the Invoice Entry records
will have had a quoteid or a quote for them and they would need to be
manually input. I am getting confused do both the QuoteForm and the Invoice
Entry form have to have the same field names ex. cost, quantiy, etc. and how
can it fill for only some of the records and how can I let the user input for
the other records. Do I have to go through ALL of my calc. and put the form
name in front of all ex. cost fields???

Confused -
Thanks,
Barb


Was this post helpful to you?
Reply Top





mscertified 11/30/2005 9:21 AM PST



It depends what you want.
All you really need in the invoice record is the quote id which links to the
quote table. If you want to have the data from the quote record actually
placed in the invoice record, you need to handle that yourself. When a quote
is selected, you will need to set up an event procedure to go out and pull
the data from the quote record and place it in the desired form controls. The
quote control would be an unbound combo box and its rowsource would be the
quotes table.
Presumably there is some way to relate invoice records to quote records (by
company name or something).

Dorian

:

Click to show or hide original message or reply text.

I have created a form to enter records for invoicing for shipment of trucks.
It includes the cost of the matl shipped the quantity, client id, client
address, dates, and some calculations of ex. cost*quantity of matl. There is
a step previous to this where some companies are receiving a quote based on
which would fill some(most-not all) of the fields for this form. I would
like the existing form (Invoice Entry) to have a drop down for a QuoteID and
have it fill the ex. cost, quantiy etc. Not all of the Invoice Entry records
will have had a quoteid or a quote for them and they would need to be
manually input. I am getting confused do both the QuoteForm and the Invoice
Entry form have to have the same field names ex. cost, quantiy, etc. and how
can it fill for only some of the records and how can I let the user input for
the other records. Do I have to go through ALL of my calc. and put the form
name in front of all ex. cost fields???

Confused -
Thanks,
Barb



Did this post answer the question?
Reply Top





babs 11/30/2005 1:56 PM PST



What would the event procedure look like? where do you put the event
procedure ? on each field or can you add a string after update for the quote
id from the drop down. the quote id would be the common field however not
every record for the invoice may have a quote id. quote id is primary in the
quote table but the invoice # is primary for the invoice table.

Thanks,
Barb



:

Click to show or hide original message or reply text.

It depends what you want.
All you really need in the invoice record is the quote id which links to the
quote table. If you want to have the data from the quote record actually
placed in the invoice record, you need to handle that yourself. When a quote
is selected, you will need to set up an event procedure to go out and pull
the data from the quote record and place it in the desired form controls. The
quote control would be an unbound combo box and its rowsource would be the
quotes table.
Presumably there is some way to relate invoice records to quote records (by
company name or something).

Dorian

:

Click to show or hide original message or reply text.
 
S

SG

On my C drive I have a folder named Cleannorm
In that folder is normal.dot
I need to write a vb to delete all the templets in
C:\documents and setting\user name\application data\microsoft\templates
Than run WinWord.exe

Anyone know how to do this? Please Help!!

SG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top