Auto Fill info

L

LJ

Let Give this forum a try...

Here is the scoop:

I hav built a set of tables... then make a couple of forms to input data
onto those tables...

So Form 1 = CheckInTicket
Form 2 = LoadingCheckList

Now there are several fields that are identical on both forms.

Ex:

CheckInTicket: LoadingCheckList

Order Num: Order Num:
Customer: Customer:
Date and Time: Assing:
Lic: ID Code:
etc: etc:

Here is what i am attempting to do which i though was simple:

Since one of my Employees has to create a check in ticket first to each
truck...and then when that truck is being worked on we need to fill out the
loadint check list.

I would like to...In the LoadingCheckList form i would like to, to type in
the order number and (based on what was entered on the CheckInTicket form)
generate/auto fill the Customer field.

Ex:

CheckInTicket:
LoadingCheckList:

Order Num: 123456 Type in --> Order Num: 123456
Customer: Client Automatically get --> Customer: (Auto
fill) Client

Both of this are in two different forms:

I tried Find Match command but that only pops out the record doest fill in,
also recordsetclone but keep getting errors.

then i tried this

Dim rs As DAO.Recordset
Dim sSQL As String

sSQL = "SELECT * FROM CheckInTicket WHERE OrderNum = " & Me.OrderNum

Set rs = Currentdb.OpenRecordset(sSQL, dbOpenSnapshot, dbReadOnly)
If rs.EOF Then
MsgBox "No matching record."
Else
Me.Customer = rs!Customer
Me.Lic = rs!Lic
End If

rs.Close
Set rs = Nothing

but keeps asking me to Debug....HELP!

Does any one know the correct code for this or anything along this lines
that can help
 
T

Tom van Stiphout

On Sat, 18 Jul 2009 14:38:01 -0700, LJ <[email protected]>
wrote:

OK, I understand your basic issue to be: if I select an OrderNumber, I
want some related info about that order to be displayed as well.

To do that, create a dropdown control (let's call it myDropdown) with
all orders, with a RowSource that includes (perhaps hidden) that
additional information. Something like:
select OrderID, OrderNum, CustomerName
from Orders inner join Customers on Orders.CustomerID =
Customers.CustomerID
Set the ColumnWidths property to "0;1;0" (this will hide the OrderID
and CustomerName)
Then create a textbox and set its controlsource to pick up the
CustomerName:
=myDropdown.Column(2)

-Tom.
Microsoft Access MVP
 
L

LJ

Question? I dont have all these orders information until they are checked
in, and since this is live data...well will this fucntion work with
that...keep in mind, first they come in and check in then once we are ready
to work on them we pull out the loading check list...

Sorry if i miss understood and a thousand pardos for my ignorace
 

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