Form not retrieving same data as query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form, based on a query with 2 tables. When I enter something into a key field in the query I get data returned. When I enter the same value into the same field on the form, I get nothing.

Does anything pop out for a reason as to why? Properties for this form are the same as another form (which is based on similar tables, different key field).

tia,
 
I have a form, based on a query with 2 tables. When I enter something into a key field in the query I get data returned. When I enter the same value into the same field on the form, I get nothing.

Does anything pop out for a reason as to why? Properties for this form are the same as another form (which is based on similar tables, different key field).

tia,

Entering data onto a form - unless you have some code on the form to
run a search - won't "retrieve" anything; it will just overwrite
whatever was there before. Could you explain what you're doing, and
what if any code there might be on the form that is "working"?
 
I should have given more info; my fault.

I have a data entry form which displays an employee's information based on the user entering that employee's SSN. i.e., After the user enters the SSN and tabs to the next field, the employee's information is retrieved and displayed. We are eventually getting away from using the SSN as a means of identifying employees and will use a unique employeeID instead. When I change the data source for the bound control to the employeeID and tab to the next field, the employee's information is not retrieved; but when I go to the underlying query and enter the employeeID, I get my data.

I must be missing something really basic, but can't find it. I've also been looking at this application waay too long.

tia,
 
I have a data entry form which displays an employee's information based on the user entering that employee's SSN. i.e., After the user enters the SSN and tabs to the next field, the employee's information is retrieved and displayed. We are eventually getting away from using the SSN as a means of identifying employees and will use a unique employeeID instead. When I change the data source for the bound control to the employeeID and tab to the next field, the employee's information is not retrieved; but when I go to the underlying query and enter the employeeID, I get my data.

Again...

Selecting an EmployeeID from a bound combo box *will not find any
data*.

All it will do is overwrite the employeeID of the currently selected
record with the chosen employeeID (and if the ID is a Primary Key,
generate an error message).

I strongly suspect that your SSN control has some AfterUpdate code in
a macro or in VBA which synchronizes the form to that record, and that
your EmployeeID field doesn't.
 
Back
Top