New to database creation (1 Viewer)

anthonyphillips

Registered User.
Local time
Today, 23:39
Joined
Nov 7, 2007
Messages
50
Hi Guys

I am fairly new to designing databases and so far the wizards have been great, I am told to avoid the wizards but when you are clueless they work fine.

The database:
I have designed a database that contains 2 tables linked via the customer name field. The first table is the client details name address etc and then the 2nd table is for booking requests.

The Question:
I need to know when the user clicks on the command button to open a new client record or even a new booking is there a way of showing a blank record instead of the other clients data? Also is there a way of having a box that will look up the name of a client and then return all data on that person.

My thanks in advance, and please remember when posting replies that i am a newb and am confused already lol

Cheers Guys

Anthony
 

neileg

AWF VIP
Local time
Today, 23:39
Joined
Dec 4, 2002
Messages
5,975
You can change the form properties for Data Entry to Yes. This will give you a new blank form.

You would select your client name from a Combo Box. Depends what you mean by 'all data' as to what happens next.
 

anthonyphillips

Registered User.
Local time
Today, 23:39
Joined
Nov 7, 2007
Messages
50
Thanks - let me expand

You can change the form properties for Data Entry to Yes. This will give you a new blank form.

You would select your client name from a Combo Box. Depends what you mean by 'all data' as to what happens next.

I am looking for the combo box to hold a list of client names, so obviously i link the combo to lookup the client name field fine no probs there, but once that name has been selected i then want the form to auto populate and recall all data from both tables with a relationship to that name.
 

anthonyphillips

Registered User.
Local time
Today, 23:39
Joined
Nov 7, 2007
Messages
50
last post misleading - sorry

I am looking for the combo box to hold a list of client names, so obviously i link the combo to lookup the client name field fine no probs there, but once that name has been selected i then want the form to auto populate and recall all data from both tables with a relationship to that name.

I just re-read this and realised it might sound confusing.

The form is designed and set out with text boxes, once the name has been selected within the combo box i want the form to populate the text boxes with the recalled data.
 

neileg

AWF VIP
Local time
Today, 23:39
Joined
Dec 4, 2002
Messages
5,975
Are you wanting to display the data or populate a table with the data?
 

anthonyphillips

Registered User.
Local time
Today, 23:39
Joined
Nov 7, 2007
Messages
50
explanation !

Are you wanting to display the data or populate a table with the data?

Effectively what i want to do is have a from with blank boxes on for each field so name address telephone email etc then once a name has been selected from the combo box and perhaps a search button would be added it will find the required data and fill the empty boxes with the data held for that person.
 

neileg

AWF VIP
Local time
Today, 23:39
Joined
Dec 4, 2002
Messages
5,975
Are you wanting to display the data or populate a table with the data?
From your explanation I still don't know if you want to store the data and save it, or not.
 

anthonyphillips

Registered User.
Local time
Today, 23:39
Joined
Nov 7, 2007
Messages
50
details

Imagine having a combo box that you can select a name from.

Once you have selected the name you can click on a search button and for the required fields it brings the data onto the form. No Saving or editing just to view the required information solely from the name in the combo box
 

neileg

AWF VIP
Local time
Today, 23:39
Joined
Dec 4, 2002
Messages
5,975
The query that the combo is based on should include the fields that you want to display on the form. Set the column widths in the combo to zero so these columns are hidden from the user. In the controls you want to populate, use the appropriate column of the combo to get the data. In the after update event of the combo you need to refresh the form.
 

anthonyphillips

Registered User.
Local time
Today, 23:39
Joined
Nov 7, 2007
Messages
50
full page forms

Okay have sorted the combo issue by putting code behind the button and using the .field functions.

Does anybody know the sizes to have a full screen form showing not opening as half page ?

Thanks
 

CraigDolphin

GrumpyOldMan in Training
Local time
Today, 15:39
Joined
Dec 21, 2005
Messages
1,582
Put...

DoCmd.Maximize

...in the on_open event of the form.
 

krish

New member
Local time
Tomorrow, 04:09
Joined
Jan 11, 2008
Messages
5
Put...

DoCmd.Maximize

...in the on_open event of the form.

I am new to access. As suggested by you I put the command in event onclick in property window of the startup swithboard. Now, I whenever I am trying to open the database, it is showing cannot recognize docmd macro and I am unable to open the database.

How can I solve the problem? Please help.:eek:
 

CraigDolphin

GrumpyOldMan in Training
Local time
Today, 15:39
Joined
Dec 21, 2005
Messages
1,582
As suggested by you I put the command in event onclick in property window of the startup swithboard

Read my post again. I did not say to put it in the on_CLICK event...I said to put it in the On_OPEN event of the form that you wish to have maximized.

Go to the form you wish to maximize.
Open the properties for the FORM.
Go to the events tab
find the on_OPEN event. You should see an ellipse (...) on the right side of the line. Left-click the ellipse.
You should see a small window giving you three options. Choose 'Open the VBA Editor' option.

The VBA editor should open and the cursor should be in a new sub

Code:
Private Sub YourFormName_OnOpen()
[your cursor should be here]
End Sub

Place the code I gave you into this sub.

Code:
Private Sub YourFormName_OnOpen()
DoCmd.Maximize
End Sub

Close the vba editor. You should see your form. Save your form. Next time it opens it should maximize.

(And don't forget to remove that piece of code from the on_click event of your switchboard.)
 

Users who are viewing this thread

Top Bottom