Open new blank form

rafirasyidi

New member
Local time
Yesterday, 22:25
Joined
Dec 18, 2015
Messages
4
Hi


I have question regarding to form in Microsoft Access. Currently I'm developing a database access about game rental shop. I'm about to issuing game to a member (using update query). However, every time I click a button to open 'Issue Game' form it is always keep the old record, but what I want is to open new blank form but not remove some fields for example are stock ID, catalogue no, and Game title. I have tried to put 'GotoRecord new' on macro but it doesn't work.


I hope you guys would help me!


Thanks!

Rafi
 
In "On Load" event of the form put this code:

Code:
Private Sub Form_Load()
    DoCmd.GoToRecord , , acNewRec
End Sub
 
Hi cyanidem

I'm sorry to ask but where should I put the code? is it VBA code? At this moment I'm not allow to use any VBA code. It is possible if you could show me on macro?

Thanks

Rafi
 
Yes, it's VBA code and I don't understand how can you not be allowed to use it, especially if you can use macro?
I don't use macros so not sure if I can help you more. Quick googling shows that your macro should have two lines:
1) open form
2) GoToRecord (Record: New)
 
To be honest, I'm not really sure why I'm not allow to use any VBA code. As my lecturer said that if I'm using any VBA code my database won't get any mark. But thank you for your help and I'll google it and if I have further questions I'll come back again.

Thank you cyanide.


Rafi
 
well these bits

stock ID, catalogue no, and Game title.

don't all need transferring to the hire form.

The only bit the hireform needs is the PK of the game, which will be the stock id.

Therefore, I expect you can do this with a form/subform, which is no doubt what you are expected to do.

form showing games
subform showing hires linked to the games

access can manage the form/subform links and you don't need any code.
 

Users who are viewing this thread

Back
Top Bottom