Form macro won't go to new record.

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

Guest

I open a form and get an error stating "You can't go to the specified record."
Followed by "You may be at the end of a recordset."

I have a macro that requires the form to goto a new record but this also
shows up as halted.

Below is my query for the form. What am I missing?

SELECT [Scrap Data].[Date of Occurrence], [Scrap Data].[Piece Number],
[Scrap Data].Quantity, [Scrap Data].[Operator Clock Number], [Scrap
Data].Shift, [Scrap Data].[Department Number], [Scrap Data].[Defect Code],
[Scrap Data].Model, [Scrap Data].[Plant Code], [Part numbers].M06MODEL,
[Scrap Data].[Where was scrap created?], [Scrap Data].Comments, [Part
numbers].M06PRDES, [Part numbers].C19MTLCT, [Part numbers].C19LABBU, [Part
numbers].C19LABCT, [Part numbers].C19LVLAB, [Part numbers].C19MLBCT,
[Quantity]*[C19MLBCT] AS [Total Scraped], [Scrap Data].Description, [Scrap
Data].[Material Cost], [Scrap Data].[Labor Cost], [Scrap Data].Burden, [Scrap
Data].MLB, [Scrap Data].Sorted
FROM [Part numbers] INNER JOIN [Scrap Data] ON ([Scrap Data].[Plant Code] =
[Part numbers].IACPLANT) AND ([Part numbers].TASMPN = [Scrap Data].[Piece
Number])
WHERE ((([Scrap Data].[Date of Occurrence])>#1/1/2005#))
ORDER BY [Scrap Data].[Date of Occurrence];
 
Thanks for looking into this.
I was able to isolate the issues after I sent the question out. When the
table the query was referring to was reimported the primary key fields were
not set. When I discovered this and set the key fields it worked. I just
hate spending time on simple issues that take so long to figure out (3 hours).
Thanks anyways,
James

JohnFol said:
What code runs on the On_Current for the form?


James Kendall said:
I open a form and get an error stating "You can't go to the specified
record."
Followed by "You may be at the end of a recordset."

I have a macro that requires the form to goto a new record but this also
shows up as halted.

Below is my query for the form. What am I missing?

SELECT [Scrap Data].[Date of Occurrence], [Scrap Data].[Piece Number],
[Scrap Data].Quantity, [Scrap Data].[Operator Clock Number], [Scrap
Data].Shift, [Scrap Data].[Department Number], [Scrap Data].[Defect Code],
[Scrap Data].Model, [Scrap Data].[Plant Code], [Part numbers].M06MODEL,
[Scrap Data].[Where was scrap created?], [Scrap Data].Comments, [Part
numbers].M06PRDES, [Part numbers].C19MTLCT, [Part numbers].C19LABBU, [Part
numbers].C19LABCT, [Part numbers].C19LVLAB, [Part numbers].C19MLBCT,
[Quantity]*[C19MLBCT] AS [Total Scraped], [Scrap Data].Description, [Scrap
Data].[Material Cost], [Scrap Data].[Labor Cost], [Scrap Data].Burden,
[Scrap
Data].MLB, [Scrap Data].Sorted
FROM [Part numbers] INNER JOIN [Scrap Data] ON ([Scrap Data].[Plant Code]
=
[Part numbers].IACPLANT) AND ([Part numbers].TASMPN = [Scrap Data].[Piece
Number])
WHERE ((([Scrap Data].[Date of Occurrence])>#1/1/2005#))
ORDER BY [Scrap Data].[Date of Occurrence];
 
Back
Top