PDA

View Full Version : Solved: Form1 Opens Form2



Imdabaum
04-27-2010, 02:30 PM
I've done this before, but for some reason this isn't returning a record.

I have certain data that I place on an InputForm. After I'm done there is additional information that gets put into another table but relating to that same company.

So on the inputform, I have a button to open the next form:Form2.
Form2 has the following query as it's record source:

SELECT Table1.[Record#],Table1.[Company#],Table1.[Input Date]
FROM Table1
WHERE (((Table1.[Company#])=[Forms]![InputForm]![Company#]))
ORDER BY Table1.[Input Date];

When I open the query I see the record that corresponds to the InputForm's company#. But the form displays without any of the query results with a recordcount of 1 and no data shows.

I am using Access 2003 with a SQL Server backend, in case that makes a difference.

Imdabaum
04-27-2010, 03:13 PM
Just had to bang my computer... I don't know what happened, but now it works. So I guess this is somewhat solved... now it at least opens to a new record or the matching record, but now it says there's a conflict everytime I try to add more data.

CreganTur
04-28-2010, 05:02 AM
What kind of message are you getting when you try to add a new record?

If SQL Server is your backend, then you should really consider building this as an Access Project... unless you have some reason for local tables in the Access DB.

Imdabaum
04-28-2010, 07:18 AM
When I click the button to open Form2 I get a "Write Conflict" message

"This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made..."

I get the option to copy to Clipboard or Drop Changes.

There are some local tables in Access that are being used. The file was created before I got here. Our department doesn't have full access to make changes to SQL Server so we can't create these tables and such without having them locally. I'd love to try making an Access Project though.

Imdabaum
04-28-2010, 10:22 AM
I found a couple forums that suggested if I had any bit values to make sure they have defaults. I have modified the table so the bit fields are defaulted to 0. This allowed me to enter data when Form2 first opens. However if I open it again, the record is locked and I get the above message again without the "Save Record" option.

Edited:: However if I set a default for all the bit values instead of skipping the one at the very end, it does work without any problems. *knock on wood*.

Thanks for bearing with me.