Strange value in field on subform

shenty

Registered User.
Local time
Today, 04:49
Joined
Jun 8, 2007
Messages
119
I have just created a form with a subform. The subform is linked to the main form via a field 'TAG'.

The main form has a listbox of cows available for being AI'd or Bulled. When a cow is selected in the listbox it brings up its own history in the subform.

BUT.....

The TAG field on the 'next record' is populated with the value 1148 on every cow and i can't work out where it has come from or what it is doing there !!!! Its almost funny but now its beginning to annoy me that i can't find out where it is coming from.

The value does not relate to anything in any table & the only thing i think it can be is a PK_ID from one of the cows but i haven't a clue how it is getting there or how to get rid of it.

Would anyone be kind enough to view this sample db and point out what is most likely staring me in the face ;)
 

Attachments

i've not looked, but is/was the tag value of 1148 set on the first item, and not cleared as you added cows to the dbs - does it represent the id of a particular cow.

by the way, its one of my favourite jokes

"shouldn't the farmer do that"
"no, it has to be the bull"
 
i've had a look now

i'm not sure, but the subform query doesnt allow additions, and you cant edit the funny row. if you open the subform, you dont get the funny row either. You sohuldnt be able to see the new item (* row), but for some reason you can.

FIX
so, if you set the subform to allow additions = false, then the phantom row disappears.
(although this begs the question - how do you add new data to the system)

note that on the main form you can add navigation buttons, which gives you data movements controls at the bottom.

I think these issues may arise because the TAG is not the primary key in the animal register table.
 
Not sure where it is coming from either but since you aren't really adding any records in that subform, why not just change the ALLOW ADDITIONS property to NO and then it won't show up.
 
I couldn't trace the source either, searching everywhere! Even checked out the Tag property of the field, in case something was entered there and Access was confused. Finally did what I always do after concluding that the Access Gnomes have had a brain fart, I went into subformAIBulling in Design View and deleted the Tag textbox. Then I dragged it over again from the Field List and voila! No more 1148!

Linq
 
I went into subformAIBulling in Design View and deleted the Tag textbox. Then I dragged it over again from the Field List and voila! No more 1148!

Linq

Strange - i deleted the subform and added it again and that didn't get rid of it. Never thought to delete just the TAG field !

Even more strangely the 1148 just dissappered at some point and i can't remember what i did - it just went !!!

Oh well - thanks to you all for looking. At least i feel better knowing the chances are i hadn't screwed something up.
 

Users who are viewing this thread

Back
Top Bottom