Link Table to Form

nick401k

Board Regular
Joined
May 7, 2009
Messages
86
Hello all,

I feel rather ridiculous for asking, but I can't seem to get a form that I've designed to link to a table in my database.

I created for form directly from the table and now have the form fully designed (looks very nice)...except for the fact that it does not do what I need it to do - display the data in the tables in the database.

Is there something I'm overlooking?

Thanks!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
While the form is in design view, go to the properties dialog and under the DATA tab, select the table from the drop down list which appears when you click into the RECORD SOURCE property.

Then for each control, do the same for their CONTROL SOURCE property (except you select the field FROM that table which you want for that control).
 
Upvote 0
I feel slightly ridiculous for asking this - you did add controls to the form that were bound to fields in the table?

Is there any data displayed at all?

How about a 'blank' record similar to what you would see when adding a new record?
 
Upvote 0
The form is set to the record source of the table, and all controls are tied to the specific field that I want to display data from.

No, no "blank" shows.

The record navigation at the bottom says "record 1 of 1" even though there are plenty of records in the table.

Thanks for the responses.
 
Upvote 0
Can you enter data?

If you can it sounds like the form could be set for Data Entry.

By the way I didn't really mean 'blank', I just meant empty fields.

You probably already know that though.:)
 
Upvote 0
Voilà!

Thanks!

Ok, so now that it's not set for Data Entry anymore, can I still enter text in and it will update my table?

Thanks for your help!
 
Upvote 0
Data Entry just is for that ADDING records and not caring to see existing ones. So if you set DATA ENTRY to NO then you can still add records but you can also edit existing ones and view existing ones. One caveat though - when you open the form it will be on the first record that appears in the recordset so you may want to have it move to a new record upon opening so that someone doesn't accidentally start typing and overwrite an existing record's data.

You can do that with code like this in the On Load event of the form (make sure to put this in the VBA window and not in the event properties in the properties dialog):
Code:
If Not Me.NewRecord Then
   DoCmd.RunCommand acCmdRecordsGoToNew
End If
 
Upvote 0
Thank you so much!

Any suggestion on how to easily learn how to write code like what you just supplied? That's a HUGE help!

I appreciate both of your posts, didn't think I'd figure this out.
Thanks!
 
Upvote 0
Go to http://www.functionx.com

and look down the left hand side and there are some tutorials for Access 2003 VBA and Access 2007 VBA. Either one would get you going as there isn't that much difference between them. If you are on 2010, you might go for the Access 2007 one as that would be closer.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,703
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top