Solved

Is it possible to update the datasheet view in a split form?

Posted on 2010-08-30
13
539 Views
Last Modified: 2013-11-28
is there a way to update the datasheet view in a split form by adding a look up query in the form view? Every time I add a field, it adds a column to the datasheet view (which i understand is automatic) but I would like to search for a record and have all the information show up below.
0
Comment
Question by:jtovar3
13 Comments
 
LVL 10

Expert Comment

by:t_hungate
Comment Utility
Please clarify.  "Every time I add a field" Are you adding the field to a table, a query or the form?

Are you dispaying all of your records on form load/open, and then filtering them down by some sort of input?

Also, what version of Access are you using?

If possible, inculde your db with some sample data.  That way I can see what you are looking at, and possibly just make a quick fix for you.

TLH
0
 
LVL 14

Expert Comment

by:Bill Ross
Comment Utility
Hi,

In form view of the form you want to change just modify the datasheet column widths, fonts etc. and click Save.

Bill
0
 

Author Comment

by:jtovar3
Comment Utility
Sorry, here is my clarification.

I want to be able to add records and update records from the Add Record Split form. I was just wondering if there was a way to query and display the information in the datasheet view from the top form view.

For example... say i was in the Split sheet... could i include an interface search button at the top so taht it would only display those records in the datasheet?

I have included a sample database with sample data in hopes that it clarifies what I am trying to do.

i hope that makes sense. i can try and clarify further if necessary.

- In terms of the "adding fields" ... i had meant that when I add an input box to the form, it automatically adds a column, which I do not need.
Copy-of-Database2Local.accdb
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
Comment Utility
<i include an interface search button at the top so that it would only display those records in the datasheet?>
You are just explaining what you want, not how this "Search" will function specifically...

In any event...
First, a split form displays the same number of records in both views.
The only difference is that the Top view(Typically in Single form view) will only display 1 record at a time.
So, a Split Form is designed to show the same records in both views, so filtering one world result in filtering the other.

So if by "Search Button" you mean that you will be providing a "Field Search Criteria" in an unbound textbox, then by clicking the button, this would filter both views to display records matching the criteria, ...then yes,... this is possible.

For example you want to filter the form for all records containing the exact string: "Tester" in the "Interface Description field.



Try this:

;-)

JeffCoachman


Copy-of-Database2Local.accdb
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Just FYI:

Sample database notes:
Back up your database(s).
Combine the front and back ends into one database file.
Remove any startup options, unless they are relevant to the issue.
Delete any objects that do not relate directly to the issue.
Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
Compile the code. (From the database window, click: Debug-->Compile)
Run the compact/Repair utility.
Remove any Passwords and/or security.
Post explicit steps to replicate the issue.
Test the database before posting.

In other words, ...post a database that we can easily open and "immediately" see the issue

;-)

JeffCoachman
0
 

Author Comment

by:jtovar3
Comment Utility
@boagg that is perfect! Thank you so much for that and the advice on how to upload sample DB's

if you have time, could you please just explain a little bit about what you did so I can edit it to search a different field like interface number? but otherwise, that is perfect!
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Closing Comment

by:jtovar3
Comment Utility
EXCELLENT! I just wish I knew what exactly you did so i can edit it and/or add more search fields
0
 

Author Comment

by:jtovar3
Comment Utility
Another question... if I wanted to copy and paste it into my actual database... how would I go about doing that?

Thanks for all the help!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Bear in mind that you have asked a question that requires that you be proficient in Form design and VBA Coding.

So when you ask:
" could you please just explain a little bit about what you did so I can edit it to search a different field like interface number?"
I don't know how to explain it if you don't know Form design or VBA Coding.
Basically I added the text boxes and set the Form's Filter Property based on the values in the textboxes.
(is this the: "explain a little bit about what you did... " that you wanted?)

As a show of good faith I have adjusted the sample to search two fields.

The code is commented, so you will have to read through the code and adapt it to your specific database.
This code can be viewed by pressing Alt+F11.

Also you should pick up a good book on From design and VBA Coding for MS Access

;-)

JeffCoachman
Access-EEQ--26439035FilterSplitF.accdb
0
 

Author Comment

by:jtovar3
Comment Utility
Thank you so much @boagg, like i said this code is exactly what I am trying to do.

I am familiar with VBA but my issue is how to use it in Access. Honestly, this database was supposed to be my introduction into creating a database, but my bosses have been asking for functionality that I just don't know how to do yet. I guess this is a kind of Trial By Fire.  X_x

I still have issues taking your code and getting it to work in my database. When given code like this, should I be importing the whole form into my database, or can I just put in the code into "Code Builder" option using Build Event.

I copied over the text boxes, and the buttons, then went to the code builder and copied in your fabulous code, but it's still not working. What else do I need to change/adjust?

You have been so helpful. Thank you!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Well for starters you must change all the object names in the code to match the object names in your actual database.

So make sure the Button Names and the textbox names are correct for your database.

You should probably change the variable names as well so it is more descriptive of your database.

So if you are searching for last name instead of SAP, then the variable would be renamed to: strLastName.

Also, remember that this is the sample you submitted.
So the presumption was that this would work in your database directly.

If you are not good at adapting code, then perhaps you should post a sample that is more representative of your actual database.

JeffCoachman
0
 

Author Comment

by:jtovar3
Comment Utility
Okay I finally got it working. I just needed to sit down and focus on it instead of being pulled away every 15 minutes. Thank you so much again!

Is there a way i can award extra points? haha
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
<Is there a way i can award extra points? haha>

As long as I have helped you in some way, this will be enough...

;-)

Jeff
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now