open a table from Form

aman

Registered User.
Local time
Today, 01:44
Joined
Oct 16, 2008
Messages
1,251
Hi guys

Is it possible to open a table to make any changes in the existing records when a button on the form is clicked. And then when changes have been made then close the table and focus comes to the form again.

I want it to happen under admin rights as my client want this type of facility.

Any help would be much appreciated.

Thanks
 
DoCmd.OpenTable "NameOfTable"

JR
 
If your client wants to see the details of the current record then I suspect you want to do something like this:

http://baldyweb.com/wherecondition.htm

Instead of opening the whole table, open a second form to the record selected on the current form.
 
The following code works fine but it display the form upon the table but in actual it should be displayed upon the form.
Code:
Private Sub Command42_Click()
DoCmd.OpenTable "tblcustomer", acViewNormal
mystr = Text40.Value
FltrStr = "ProjectRef ='" & mystr & "'"
DoCmd.ApplyFilter , FltrStr
End Sub

Thanks for any help.
 
Code:
Private Sub Command42_Click()
DoCmd.OpenTable "tblcustomer", acViewNormal
mystr = Text40.Value
FltrStr = "ProjectRef ='" & mystr & "'"
DoCmd.ApplyFilter , FltrStr
End Sub
This is not what I advised.

The following code works fine but it display the form upon the table but in actual it should be displayed upon the form.
I can't make sense of what this means. Build a form and set it to datasheet view. Open the form using the method advised.
 
Thanks VBAInet. It worked gr8. I never used this option in Access earlier.

Thanks for your help.
 
Now again a new problem as in my table there are about 90 fields that I want to show in a form using form wizard in tabular form.

But it doesn't allow me to do that and an error comes like "too many fields".

But if the no. of fields are less than everything goes smooth.

Thanks
 
What is the exact error message and at what stage does it come up?
 
When I try to create a form using form wizard and then try to select the fields that should be present in the form and then in the layout if I select tabular and then finish. It gives me following error message:

"The wizard is unable to create your form or report because you chose so many fields; please try again with fewer fields."

Thanks
 
How many tables or queries are you using for this form?

In each of the tables or queries how many fields are there?
 
I am using just one table and in that table there are about 90 fields.

Thanks
 
It's looking like that table is not normalized. Do you have a Primary Key in that table, by the way?

What you can try is to first build a query based on that table. Then use the query as the Record Source of your form. See if that works.
 
Yes, I have a primary key in the table(Id as autonumber).

But if I create a query from the table then again there will be around 70 fields as my clients all those fields to input values in.So the query will give the same problem "too many fields"

What would you suggest?

Thanks
 
But if I create a query from the table then again there will be around 70 fields as my clients all those fields to input values in.So the query will give the same problem "too many fields"
Ok, this is what you suspect will happen but have you tried it out?
 
the wizard may not be able to handle 70 fields -but you can certainly deal with them manually.

70 sounds a lot to take in on a single form, anyway - perhaps you can add a tab control, ahd group them logically under different tabs.

The wizards only take you so far.
 

Users who are viewing this thread

Back
Top Bottom