Re: Trouble opening a form from a subform combo box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 12/15/04


Date: Wed, 15 Dec 2004 21:55:27 +1300

Tammy,

I think the problem has to do with the correspondence of the data which
you are trying to match. I tried to explain this in my previous
response, but I will try again now. In effect, you are trying to relate
the values in the Part_Number field in the Documents table with the
values in the tblPartNumber_ID field in the tblAffectedParts table. I
do not think this is correct. I do not think these values relate. In
your tblPartNumber_ID combobox, what you will *see* when you select an
item from the drop-down list is the value of [Part_Number] & ''
(whatever the purpose of the "& ''" is a mystery, doesn't really seem to
make sense, but that's another issue). This is the second column of the
combobox's Row Source query, as you don't see the first column because
its Column Widths property sets the first column to 0" wide, i.e.
hidden. But the first column is the Bound Column, which is the ID
field, i.e. it has the same *values* as the ID field in the
tblPartnumber table, which is an AutoNumber. So, it seems to me, that
you are trying to open the Documents form where the Part_Number field is
equal to the value of the tblPartNumber_ID combobox (*not* what you
actually see in the combobox, which is not its value), which it will
never be equal to. I think this is what you need to sort out.

-- 
Steve Schapel, Microsoft Access MVP
Tammy wrote:
> This one is giving me the following error:
> 
> unidentifed function
> 'Forms![ECO FORM]![subfrmAffectedParts]![tblPartNumber_ID] 
> .[Column]'
> in expression
> 
> the the field part_number is in my form Documents and also in my 
> tblPartNumber (Calling it tblDocuments was a mistake) that you see in the 
> Query. tblPartnumber has the following fields 
> Part_Number (data type text)
> APDesc (data type text)
> ID (data type AutoNumber)
> 
> The the form Documents was created from a table called Documents and created 
> from the table not a query
> has the following fields:
> ID AutoNumber
> Part_Number (data type text)
> Desc (data type text)
> Revision (data type text)
> and a few other fields.
> 
> tblAffectedParts and has the following fields
> Revision (text)
> id1 (autonumber)
> BaseNumber (text)
> Extension (number)
> tblPartNumber_ID (number) Lookup field  SELECT [ID] AS xyz_ID_xyz, 
> [Part_Number] & '' AS xyz_DispExpr_xyz, [Part_Number] FROM tblpartnumber 
> ORDER BY [Part_Number]; 
> 
> and the query qryaffectedparts SQL
> SELECT tblAffectedParts.tblPartNumber_ID, tblAffectedParts.REVISION, 
> tblAffectedParts.BaseNumber, tblAffectedParts.Extension, tblPartNumber.APDesc
> FROM tblAffectedParts LEFT JOIN tblPartNumber ON 
> tblAffectedParts.tblPartNumber_ID = tblPartNumber.ID;
> 
> It seems to me that some how, I need to get to the Part_Number field in the 
> tblPartNumber. But isnt accually part of the subfrmAffectedParts
> 


Relevant Pages

  • Re: Trouble opening a form from a subform combo box
    ... tblPartNumber that you see in the ... Part_Number (data type text) ... The the form Documents was created from a table called Documents and created ... from the table not a query ...
    (microsoft.public.access.forms)
  • Re: Delete record
    ... What data type is Codigo? ... then are you sure that first column actually contains a value? ... > Dim MySet As DAO.Recordset, ... > the register to be deleted are copied on the first register of the table. ...
    (microsoft.public.access.forms)
  • Re: Error using ado to read cvs file
    ... the name of the file and I found out I can't use wild card like: ... By default the driver uses first row's data type to ... determine, in your case, the first column in first row is a number, ...
    (microsoft.public.data.ado)
  • Re: Single precision in Simulink?
    ... "Complex signals of any data type and non-double real signals must be ... in structure format. ... The first column must contain time values and the ...
    (comp.soft-sys.matlab)
  • Export to excel leaves off leading 0s
    ... I suppose the data in the first column is something like ... The excel is identify data type of the ... >How do I need to alter the code to prevent the truncation? ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)