Solved

Access 2007 default field in subform

Posted on 2011-02-22
2
288 Views
Last Modified: 2012-06-21
Hi,
   I have a subform that uses the DLookup function as a Default Value for one of its fields. It does a DLookup on a field in the main form and tries to populate based on the result. For a while it was working without any issues but seems to intermittently break.

What the field will do is generate an accurate default value before the subform has been entered while the user is still completing the main form. Then once the user enters the subform to enter records, the default value will disappear from that field and the field will be null or blank and the user will have to manually enter the value.

I'm not sure what is causing this but there is another default valued field next to the suspect one which does not use DLookup and is simply set to duplicate a field value on the main form. This default value never resets itself and works fine.

Any help will be much appreciated,
 Thank you,
 Preston
0
Comment
Question by:prophet001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 31

Accepted Solution

by:
Helen Feddema earned 500 total points
ID: 34953372
We probably need to see the database to give more specific advice, but you may want to change to getting the value through a link, or possibly a tiny subform to just yield the value (instead of DLookup).  
0
 

Author Comment

by:prophet001
ID: 34953931
Hey Helen,
 Thank you very much for your response. You inspired me to try and use a wrapper function in VBA and wrap the DLookup function. This seems to be working well right now and there's no issues so far. I am going to go ahead and say that this is the solution. :)
Thank you again,
 Preston
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question