Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Software Development
Tag Cloud
access acer asus batch bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard mouse network printer problem ram registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Software Development >
Solved: MS Access: Automatically determine the value of one field from an ID autonumb

Reply  
Thread Tools
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
03-Feb-2010, 01:49 PM #31
My problem is that I can't see or reproduce what is "Not Working" at your end, so I don't know how to advise you.
When I open the Mainform and select a record in Subform1 the correct record in Subform2 is also selected. If I select a Record in Subform2 the correct record is also selected in Subform1.
If the database that I attached doesn't do that in Access 2007 then obviously Access 2007 has yet another problem.
I am sure that it worked for the original Poster that helped before, at least they didn't come back and say that it didn't.
__________________
OBP
I do not give up easily
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
03-Feb-2010, 11:43 PM #32
Hmm... So it seems that I have a problem with Access. Do you think this is a case of something gone corrupt with the program that's not allowing it to work properly? Or possibly something that has been omitted from Access 2003?

I found this page, which shows some bugs and what's broken/missing from Access 2007, but I couldn't seem to locate anything that might suggest a problem. (http://allenbrowne.com/Access2007.html#Bugs)

Do you know anyone else who might have Access 2007? I would like to know if whether this is an isolated case, or whether it's a generic problem with Access 2007, so then that way I can report a bug.

I've also uploaded the ACCDB version of the database so that others may have a look at that one.
Attached Files
File Type: zip DatabaseACCDB.zip (36.2 KB, 5 views)

Last edited by maxx_eclipse; 04-Feb-2010 at 05:42 AM..
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
04-Feb-2010, 04:18 AM #33
...I believe that my database might possibly be corrupted. I did some searching around for Error 3159, and I came across these 2 pages:

http://www.pcreview.co.uk/forums/thread-1068203.php
http://www.pcreview.co.uk/forums/thread-1076481.php

Both seem to point to a possible database corruption that isn't allowing for the database to work properly... Come to think of it, I just remembered that in the past few weeks, my database has not been compiling when I ask it to.

Last edited by maxx_eclipse; 04-Feb-2010 at 04:32 AM..
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
04-Feb-2010, 07:26 AM #34
I think Computerman29642 has Access 2007, so you could Private Mail him and ask.
This appears to be his last Thread
http://forums.techguy.org/dos-pda-ot...planation.html
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
04-Feb-2010, 08:59 AM #35
By the way OBP,

I posted something on the Microsoft discussion forum, and interestingly, one user replied with this message:

Quote:
I would rather try to find why it works in 2003, here what access help
states:
"However, you cannot use bookmarks from different Recordset objects
interchangeably, even if they were created from the same source or command."
Page: Working in Access 2003 but not Access 2007
turbodante's Avatar
Senior Member with 744 posts.
 
Join Date: Dec 2008
Location: GMT UK
04-Feb-2010, 10:36 AM #36
The file posted in #32 works for me, in that the ID on the Contact Details tab corresponds to that on Agenda.

Although, poking around it - i'm getting not-enough memory issues and problems with record source wotnots, but that last one could be to do with deleted tables.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
04-Feb-2010, 11:02 AM #37
Turbodante, Converted Access 2007 forms do give those kinds of errors, sometimes you have to just delete the form and start again.
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
04-Feb-2010, 11:34 AM #38
OBP, I received a reply from computerman29642, and he said that he'll have a look at the database during the weekend, so don't expect any activity on this post for another 3-4 days (unless you, me or others post something on it).

By the way, just as a reminder, I also have the discussion on the Microsoft Programming forum HERE:

Working in Access 2003 but not Access 2007
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
04-Feb-2010, 11:44 AM #39
Focusing on information provided from the Microsoft forum post, I was brought to these pages:

http://msdn.microsoft.com/en-us/library/bb221142.aspx

And I found this mentioned on the page.

Quote:
To make sure the Recordset object supports bookmarks, check the value of its Bookmarkable property before you use the Bookmark property. If the Bookmarkable property is False, the Recordset object doesn't support bookmarks, and using the Bookmark property results in a trappable error.
However, it seems that the bookmark property (expression.Bookmarkable) is default set to true... But how do I actually define/confirm the bookmarkable setting of a record?

But I'm still convinced that this is not the case, because if it works as an MDB file in Access 2003, why doesn't it work as an MDB (or ACCDB) in Access 2007?
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
04-Feb-2010, 02:28 PM #40
Well, I got a repsonse on the Microsoft forum:

Quote:
I'm surprised that the code has ever worked with any degree of reliability.
Bookmarks are unique to the recordset of each form and subform.

If I have one record in the recordset for the main form and 30 records for the
recordset in the sub-form then you can see immediately that it would not be
possible to match all the records in the subform with records in the main
form. Even if you have the same records in the two recordsets, the bookmarks
may be different if the two recordsets are in a different order.
So yeah, he seems rather surprised that it worked and claims that it really shouldn't (or that it doesn't work as well as it should, I don't know), and then he puts some coding...

And a new reply from an MVP suggests that A2007 is less flexible with incorrectly written coding...

Quote:
A2007 is a bit more inflexible when code is not written as expected. Some versions of access have an uncanny ability to guess correctly when code is less than perfect. Most likely, that code that works in A2003 will one day refuse to work in that same application, when access guesses wrongly about your bookmark code.

A2007 is more picky about code that is less than perfect. It is always a good idea to use the accepted way of writing vba code for an
access database. There are lots of examples on these discussion groups of how to do that.

Last edited by maxx_eclipse; 05-Feb-2010 at 01:31 AM..
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
05-Feb-2010, 06:04 AM #41
Both forms are based on the same Recordset (Or should be) so that does not apply here.
I like the "It is always a good idea to use the accepted way of writing vba code for an
access database", I would love to know what the Accepted Way is.
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
05-Feb-2010, 07:29 AM #42
Why don't you guys have a code-off or something?

But still, even after I explained my situation, the only 'acceptable' answer to me is: "A2007 is a bit more inflexible when code is not written as expected."

Last edited by maxx_eclipse; 05-Feb-2010 at 11:49 AM..
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
07-Feb-2010, 11:17 AM #43
Okay, my deadline is in 11 days (Friday the 19th), and I still have to do other updates on the database prior to the release.

So, if the original method of:

MainForm
> SubForm1
>> SubForm2

doesn't work, how would I attempt:

MainForm
> SubForm1
> SubForm2

???
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
08-Feb-2010, 06:15 AM #44
I don't know if you can as they are now unlinked Bookmarks.
It would be something like this for Subform2
me.bookmark = me.parent.subform1.bookmark
and for subform1
me.bookmark = me.parent.subform2.bookmark
maxx_eclipse's Avatar
Computer Specs
Member with 286 posts.
 
Join Date: May 2007
Location: http://127.0.0.1
Experience: Intermediate In Few Areas
08-Feb-2010, 08:59 AM #45
OBP, I FIXED THE PROBLEM!!!

Okay, so this is what I did:

I changed the format to:

MainForm
> SubForm1
> SubForm2

and then I did the following for "On Enter" on SubForm2 form the MainForm:

Code:
Private Sub SUBFORM_AGENDA_DATASHEET_Enter()

Set Me.SUBFORM_AGENDA.Form.Recordset = Me.SUBFORM_AGENDA_DATASHEET.Form.Recordset

End Sub
And would you believe it, it works! Thank the Lord it works!

I'm so excited, I just can't hide; I'm about to lose control and I think I like it!

But I wouldn't have gotten this far had it not been for your input OBP, thank you for your time and patience with this matter. I am in your debt.

This topic is now solved.
Reply

Tags
access, autonumber, id number, relationship, subform

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:12 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.