Guy,
I saw this and tried to do it with my database form too. It didn't
work. The way I have it setup is to pick a RepId number from a combo
box (named RepId) and have it automatically fill in another field on
the form with the text of the RepName.
Can this code be modified to do that?
Here's a copy of the code that does NOT work for me.

Private Sub Rep_ID_AfterUpdate()
If Nz(Me.Rep_Id, 0) <> 0 Then
Me.Rep Name = Rep_Id.Column(2)
End If

End Sub

Thanks,
Doreen


--- In [email protected], "Guy Harley" <[EMAIL PROTECTED]> wrote:
>
> Very easy to do. Easiest way is to have a combo box (cboEmployee)
with three
> fields - Employee #, name and address. Set the width of the second
and third
> columns to 0 to hide the contents. In the after Update event for the
combo
> box put the following code:
> 
> If Nz(Me.cboEmployee,0) <> 0 Then
>       Me.txtName = cboEmployee.Column(1)
>       Me.txtAddress = cboEmployee.Column(2)
> End If
> 
> Guy Harley
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf
> Of fsctke612
> Sent: Wednesday, 21 December 2005 8:09 AM
> To: [email protected]
> Subject: [ms_access] Populating a Form
> 
> Is it possible to automatically populate a form by inserting one piece 
> of information.  As example would be using an employee # and when it 
> is entered on the form the Employee Name and Address would 
> automatically populate.  
> 
> 
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to