Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2007 default field in subform

Posted on 2011-02-22
2
Medium Priority
?
293 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

715 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