Need access help... (1 Viewer)

Reeses

Registered User.
Local time
Yesterday, 23:12
Joined
Oct 29, 2019
Messages
17
Hey all! So I'm struggling and not finding any info online. I created a access split database for my work to keep track of packages (many will be using this). We have logged in everything and now my manager wants me to add more fields to it. So, I was able to add the fields to the back end tables. But how do I update the form? Or do I have to create a whole new form? Any help would be appreciated. Thanks!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
Presuming the form is based on the table, you should be able to add new textboxes (or whatever) and set their control source to the appropriate field. If the source of the form is a query, you may need to add them to the query first. You shouldn't have to create a new form.
 

Reeses

Registered User.
Local time
Yesterday, 23:12
Joined
Oct 29, 2019
Messages
17
Thank you so much. I will try that tomorrow at work. I appreciate your response.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
No problem, post back if you get stuck. Welcome to the site by the way!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
By the way, with the form in design view there's another way to add fields to the form, "Add Existing Fields" on the ribbon.

And if you're not seeing the new fields in the front end, you just need to refresh the link. In the LinkedTable Manager, select the table(s) and hit OK.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:12
Joined
Oct 29, 2018
Messages
21,454
Hi Reese. Welcome to AWF! Once you have added the new fields to the table, when you go to the Form's design view, you can on the Field List button on the ribbon to see if the new fields show up in the list. If they are, you can drag them from the list on to the form.

Edit: Oops, too slow and I got the button name wrong. Sorry.
 

Reeses

Registered User.
Local time
Yesterday, 23:12
Joined
Oct 29, 2019
Messages
17
Thanks again for the help. I was able to go in the back end and add to the table and then add new fields on the front end. Now it's how my manager wants it. I couldn't have done it without your help....I was seriously googling everything I could for about 3 hours. Lol. Now I know where I can go anytime I have a question. Thanks and Happy Halloween!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
Happy to help and welcome to the site by the way!

Almost candy time here.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:12
Joined
Oct 29, 2018
Messages
21,454
Thanks again for the help. I was able to go in the back end and add to the table and then add new fields on the front end. Now it's how my manager wants it. I couldn't have done it without your help....I was seriously googling everything I could for about 3 hours. Lol. Now I know where I can go anytime I have a question. Thanks and Happy Halloween!

Hi. Happy Halloween and good luck with your project.
 

Reeses

Registered User.
Local time
Yesterday, 23:12
Joined
Oct 29, 2019
Messages
17
Hey all! Sooo...I have another question. I'm so sorry. Lol. Ok, so my database form has many fields that my coworkers have to input data. But there is ONE field that I want to lock after data is put in. The thing is, it is a continuous form, so that field cant be locked when adding a new record. What the form is for is we have packages with lot numbers and me and 3 others are inputting those lot numbers in locations. When my other coworkers open the database, they search their lot number and the location shows where it is and what packages are turned in. Well, so far a few people have deleted the lot number, so we have to go find out what lot number we had in that location and re-enter it. So is there a way we can still enter the lot number but have it be locked once data is put in? Any help is appreciated. Thank you!
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:12
Joined
Oct 29, 2018
Messages
21,454
Hi. You might need code for this or an alternate approach is to use a read-only form for searching through the data.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
Try this in the current event of the form

Code:
If Me.NewRecord Then
  Me.LotNumber.Locked = False
Else
  Me.LotNumber.Locked = True
End If

Some like Boolean logic:

Me.LotNumber.Locked = Not Me.NewRecord
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:12
Joined
Oct 29, 2018
Messages
21,454
That might probably be more like:
Code:
Me.LotNumber.Locked = Not (IsNull(Me.LotNumber) OR Me.NewRecord)
 

Reeses

Registered User.
Local time
Yesterday, 23:12
Joined
Oct 29, 2019
Messages
17
I'm back! Yall have helped me so much with my last few questions. Thank you.
I have another one. Lol. Ok, so like I stated before, this is a split database. When my coworkers are looking up a lot number, sometimes it doesnt show up but when I look it up on mine, it shows up. Do you think I should do a Requery command or a auto Refresh? I want them to be able to see all updates real time so they wont have any issues looking up lot numbers. Also, if I do one of those, do I have to do it to just the form OR do I have to do it for every button I have?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
Depends on how you're searching, but if it's on a form that was loaded with data before the record was added, a requery should resolve it. You'd requery the form, not each button. Depending on the situation, a requery in the timer event of the form may be appropriate, though it could hit as the user is doing something and interfere.
 

Reeses

Registered User.
Local time
Yesterday, 23:12
Joined
Oct 29, 2019
Messages
17
This is what it looks like (I added an attachment). When the first group gets packages, they insert the lot number and put it in a cabinet that has a location. So the auditors will search for the lot number to find out what cabinet it is in and go get it. They will then fill out what packages they are auditing. So people are putting in data often. So a requery could interfere like you said. Is there another way to have it auto refresh so when they are searching for a lot number it shows up? They usually have to close the database and reopen it and then it shows up. I dont want them to have to keep doing that.
 

Attachments

  • 20191115_183514.jpg
    20191115_183514.jpg
    98.4 KB · Views: 71

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
How do they search, with the listbox? If so, you could try a requery in its got focus event.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:12
Joined
Oct 29, 2018
Messages
21,454
Hi Reeses. I agree with Paul. Please tell us how your users are conducting the search, so we can provide an appropriate suggestion. Cheers!
 

Reeses

Registered User.
Local time
Yesterday, 23:12
Joined
Oct 29, 2019
Messages
17
Theres more buttons at the bottom that you cant see. I pit a command button to "find record". So they click that and put in the lot number and that takes them to the record.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:12
Joined
Aug 30, 2003
Messages
36,124
So try putting the requery in that button.
 

Users who are viewing this thread

Top Bottom