[AccessD] Push code help please

Charlotte Foust cfoust at infostatsystems.com
Wed Jan 11 19:36:30 CST 2006


Is txtEmployeeName unbound and you just want to display it?  That isn't
what your original question suggested to me, so I might have misled you.
Text is a read-only property, so you have to set the value of the
textbox (assuming that's what txtEmployeeName is), not the Text.  Also,
the column index gets a little confusing but in this case, I believe it
should be 5, not 6 for your 6th column.

Charlotte Foust


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Hecht
Sent: Wednesday, January 11, 2006 4:22 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Push code help please


This is the sql that controls Combo32

 

SELECT [20_tblAIMaster340].ACCIDENT, [20_tblAIMaster340].DRIV_NUM,
[10_tbl_PersonelMasterData].LAST_NAME,
[10_tbl_PersonelMasterData].FIRST_NAME,
[10_tbl_PersonelMasterData].MIDDLE_Name, [Last_Name] & ", "
& [First_Name] & " " & [Middle_Name] AS Fname

FROM 10_tbl_PersonelMasterData INNER JOIN 20_tblAIMaster340
ON [10_tbl_PersonelMasterData].DRIV_NUM = [20_tblAIMaster340].DRIV_NUM;

 

I want to put FNAME from above into txtEmployeeName

 

Private Sub Combo32_AfterUpdate()

    ' Find the record that matches the control.

    Dim rs As Object

 

    Set rs = Me.Recordset.Clone

    rs.FindFirst "[ACCIDENT] = '" & Me![Combo32] & "'"

    If Not rs.EOF Then Me.Bookmark = rs.Bookmark

    

    me.txtEmployeeName.Text= me.Combo32.Column.(6)

 

I can not trace syntax error I get when I added bottom line
of code.

 

The get the record code is good.

 

Is it source = target or target = source

 

About to put my head my ADH

 

Thanks

    

 

Joe Hecht

jmhecht at earthlink.net

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list